remove env.sh

This commit is contained in:
Jaynti Kanani 2020-03-19 14:18:51 +05:30
parent c69ad1342b
commit 175f236016
No known key found for this signature in database
GPG key ID: 4396982C976BAE5E
2 changed files with 22 additions and 49 deletions

View file

@ -10,22 +10,25 @@
GOBIN = $(shell pwd)/build/bin
GO ?= latest
GORUN = env GO111MODULE=on go run
bor:
build/env.sh go run build/ci.go install ./cmd/bor
$(GORUN) build/ci.go install ./cmd/bor
cp $(GOBIN)/bor $(GOPATH)/bin/
@echo "Done building."
@echo "Run \"$(GOBIN)/bor\" to launch bor."
all:
build/env.sh go run build/ci.go install
$(GORUN) build/ci.go install
cp $(GOBIN)/* $(GOPATH)/bin/
android:
build/env.sh go run build/ci.go aar --local
$(GORUN) build/ci.go aar --local
@echo "Done building."
@echo "Import \"$(GOBIN)/bor.aar\" to use the library."
ios:
build/env.sh go run build/ci.go xcode --local
$(GORUN) build/ci.go xcode --local
@echo "Done building."
@echo "Import \"$(GOBIN)/bor.framework\" to use the library."
@ -33,7 +36,7 @@ test: bor
go test github.com/maticnetwork/bor/consensus/bor_test
lint: ## Run linters.
build/env.sh go run build/ci.go lint
$(GORUN) build/ci.go lint
clean:
./build/clean_go_build_cache.sh
@ -63,12 +66,12 @@ bor-linux: bor-linux-386 bor-linux-amd64 bor-linux-arm bor-linux-mips64 bor-linu
@ls -ld $(GOBIN)/bor-linux-*
bor-linux-386:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/bor
@echo "Linux 386 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep 386
bor-linux-amd64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/bor
@echo "Linux amd64 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep amd64
@ -77,42 +80,42 @@ bor-linux-arm: bor-linux-arm-5 bor-linux-arm-6 bor-linux-arm-7 bor-linux-arm64
@ls -ld $(GOBIN)/bor-linux-* | grep arm
bor-linux-arm-5:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/bor
@echo "Linux ARMv5 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm-5
bor-linux-arm-6:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/bor
@echo "Linux ARMv6 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm-6
bor-linux-arm-7:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/bor
@echo "Linux ARMv7 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm-7
bor-linux-arm64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/bor
@echo "Linux ARM64 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm64
bor-linux-mips:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/bor
@echo "Linux MIPS cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mips
bor-linux-mipsle:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/bor
@echo "Linux MIPSle cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mipsle
bor-linux-mips64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/bor
@echo "Linux MIPS64 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mips64
bor-linux-mips64le:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/bor
@echo "Linux MIPS64le cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mips64le
@ -121,12 +124,12 @@ bor-darwin: bor-darwin-386 bor-darwin-amd64
@ls -ld $(GOBIN)/bor-darwin-*
bor-darwin-386:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/bor
@echo "Darwin 386 cross compilation done:"
@ls -ld $(GOBIN)/bor-darwin-* | grep 386
bor-darwin-amd64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/bor
@echo "Darwin amd64 cross compilation done:"
@ls -ld $(GOBIN)/bor-darwin-* | grep amd64
@ -135,11 +138,11 @@ bor-windows: bor-windows-386 bor-windows-amd64
@ls -ld $(GOBIN)/bor-windows-*
bor-windows-386:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/bor
@echo "Windows 386 cross compilation done:"
@ls -ld $(GOBIN)/bor-windows-* | grep 386
bor-windows-amd64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/bor
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/bor
@echo "Windows amd64 cross compilation done:"
@ls -ld $(GOBIN)/bor-windows-* | grep amd64

View file

@ -1,30 +0,0 @@
#!/bin/sh
set -e
if [ ! -f "build/env.sh" ]; then
echo "$0 must be run from the root of the repository."
exit 2
fi
# Create fake Go workspace if it doesn't exist yet.
workspace="$PWD/build/_workspace"
root="$PWD"
ethdir="$workspace/src/github.com/maticnetwork"
if [ ! -L "$ethdir/bor" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s ../../../../../. bor
cd "$root"
fi
# Set up the environment to use the workspace.
GOPATH="$workspace"
export GOPATH
# Run the command inside the workspace.
cd "$ethdir/bor"
PWD="$ethdir/bor"
# Launch the arguments with the configured environment.
exec "$@"