good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 175f2360 authored by Jaynti Kanani's avatar Jaynti Kanani
Browse files

remove env.sh

parent c69ad134
No related branches found
No related tags found
No related merge requests found
...@@ -10,22 +10,25 @@ ...@@ -10,22 +10,25 @@
GOBIN = $(shell pwd)/build/bin GOBIN = $(shell pwd)/build/bin
GO ?= latest GO ?= latest
GORUN = env GO111MODULE=on go run
bor: 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 "Done building."
@echo "Run \"$(GOBIN)/bor\" to launch bor." @echo "Run \"$(GOBIN)/bor\" to launch bor."
all: all:
build/env.sh go run build/ci.go install $(GORUN) build/ci.go install
cp $(GOBIN)/* $(GOPATH)/bin/
android: android:
build/env.sh go run build/ci.go aar --local $(GORUN) build/ci.go aar --local
@echo "Done building." @echo "Done building."
@echo "Import \"$(GOBIN)/bor.aar\" to use the library." @echo "Import \"$(GOBIN)/bor.aar\" to use the library."
ios: ios:
build/env.sh go run build/ci.go xcode --local $(GORUN) build/ci.go xcode --local
@echo "Done building." @echo "Done building."
@echo "Import \"$(GOBIN)/bor.framework\" to use the library." @echo "Import \"$(GOBIN)/bor.framework\" to use the library."
...@@ -33,7 +36,7 @@ test: bor ...@@ -33,7 +36,7 @@ test: bor
go test github.com/maticnetwork/bor/consensus/bor_test go test github.com/maticnetwork/bor/consensus/bor_test
lint: ## Run linters. lint: ## Run linters.
build/env.sh go run build/ci.go lint $(GORUN) build/ci.go lint
clean: clean:
./build/clean_go_build_cache.sh ./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 ...@@ -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-* @ls -ld $(GOBIN)/bor-linux-*
bor-linux-386: 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:" @echo "Linux 386 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep 386 @ls -ld $(GOBIN)/bor-linux-* | grep 386
bor-linux-amd64: 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:" @echo "Linux amd64 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep amd64 @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 ...@@ -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 @ls -ld $(GOBIN)/bor-linux-* | grep arm
bor-linux-arm-5: 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:" @echo "Linux ARMv5 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm-5 @ls -ld $(GOBIN)/bor-linux-* | grep arm-5
bor-linux-arm-6: 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:" @echo "Linux ARMv6 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm-6 @ls -ld $(GOBIN)/bor-linux-* | grep arm-6
bor-linux-arm-7: 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:" @echo "Linux ARMv7 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm-7 @ls -ld $(GOBIN)/bor-linux-* | grep arm-7
bor-linux-arm64: 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:" @echo "Linux ARM64 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep arm64 @ls -ld $(GOBIN)/bor-linux-* | grep arm64
bor-linux-mips: 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:" @echo "Linux MIPS cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mips @ls -ld $(GOBIN)/bor-linux-* | grep mips
bor-linux-mipsle: 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:" @echo "Linux MIPSle cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mipsle @ls -ld $(GOBIN)/bor-linux-* | grep mipsle
bor-linux-mips64: 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:" @echo "Linux MIPS64 cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mips64 @ls -ld $(GOBIN)/bor-linux-* | grep mips64
bor-linux-mips64le: 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:" @echo "Linux MIPS64le cross compilation done:"
@ls -ld $(GOBIN)/bor-linux-* | grep mips64le @ls -ld $(GOBIN)/bor-linux-* | grep mips64le
...@@ -121,12 +124,12 @@ bor-darwin: bor-darwin-386 bor-darwin-amd64 ...@@ -121,12 +124,12 @@ bor-darwin: bor-darwin-386 bor-darwin-amd64
@ls -ld $(GOBIN)/bor-darwin-* @ls -ld $(GOBIN)/bor-darwin-*
bor-darwin-386: 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:" @echo "Darwin 386 cross compilation done:"
@ls -ld $(GOBIN)/bor-darwin-* | grep 386 @ls -ld $(GOBIN)/bor-darwin-* | grep 386
bor-darwin-amd64: 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:" @echo "Darwin amd64 cross compilation done:"
@ls -ld $(GOBIN)/bor-darwin-* | grep amd64 @ls -ld $(GOBIN)/bor-darwin-* | grep amd64
...@@ -135,11 +138,11 @@ bor-windows: bor-windows-386 bor-windows-amd64 ...@@ -135,11 +138,11 @@ bor-windows: bor-windows-386 bor-windows-amd64
@ls -ld $(GOBIN)/bor-windows-* @ls -ld $(GOBIN)/bor-windows-*
bor-windows-386: 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:" @echo "Windows 386 cross compilation done:"
@ls -ld $(GOBIN)/bor-windows-* | grep 386 @ls -ld $(GOBIN)/bor-windows-* | grep 386
bor-windows-amd64: 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:" @echo "Windows amd64 cross compilation done:"
@ls -ld $(GOBIN)/bor-windows-* | grep amd64 @ls -ld $(GOBIN)/bor-windows-* | grep amd64
#!/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 "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment