fixing paths using env var v2.

pull/132/head
Jason Kulatunga 4 years ago
parent 491b1ed4aa
commit 1fe56136b9

@ -1,6 +1,6 @@
export CGO_ENABLED = 1 export CGO_ENABLED = 1
GITHUB_WORKSPACE ?= /go/src/github.com/analogj/scrutiny GO_WORKSPACE ?= /go/src/github.com/analogj/scrutiny
BINARY=\ BINARY=\
linux/amd64 \ linux/amd64 \
@ -17,14 +17,14 @@ $(BINARY): OS = $(word 1,$(subst /, ,$*))
$(BINARY): ARCH = $(word 2,$(subst /, ,$*)) $(BINARY): ARCH = $(word 2,$(subst /, ,$*))
$(BINARY): build/scrutiny-web-%: $(BINARY): build/scrutiny-web-%:
@echo "building web binary (OS = $(OS), ARCH = $(ARCH))" @echo "building web binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-web -tags "static netgo sqlite_omit_load_extension" ${GITHUB_WORKSPACE}/webapp/backend/cmd/scrutiny/ xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-web -tags "static netgo sqlite_omit_load_extension" ${GO_WORKSPACE}/webapp/backend/cmd/scrutiny/
chmod +x "/build/scrutiny-web-$(OS)-$(ARCH)" chmod +x "/build/scrutiny-web-$(OS)-$(ARCH)"
file "/build/scrutiny-web-$(OS)-$(ARCH)" || true file "/build/scrutiny-web-$(OS)-$(ARCH)" || true
ldd "/build/scrutiny-web-$(OS)-$(ARCH)" || true ldd "/build/scrutiny-web-$(OS)-$(ARCH)" || true
@echo "building collector binary (OS = $(OS), ARCH = $(ARCH))" @echo "building collector binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-collector-metrics -tags "static netgo" ${GITHUB_WORKSPACE}/collector/cmd/collector-metrics/ xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-collector-metrics -tags "static netgo" ${GO_WORKSPACE}/collector/cmd/collector-metrics/
chmod +x "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)" chmod +x "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)"
file "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)" || true file "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)" || true
@ -34,10 +34,10 @@ windows/amd64: export OS = windows
windows/amd64: export ARCH = amd64 windows/amd64: export ARCH = amd64
windows/amd64: windows/amd64:
@echo "building web binary (OS = $(OS), ARCH = $(ARCH))" @echo "building web binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-web -tags "static netgo sqlite_omit_load_extension" ${GITHUB_WORKSPACE}/webapp/backend/cmd/scrutiny/ xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-web -tags "static netgo sqlite_omit_load_extension" ${GO_WORKSPACE}/webapp/backend/cmd/scrutiny/
@echo "building collector binary (OS = $(OS), ARCH = $(ARCH))" @echo "building collector binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-collector-metrics -tags "static netgo" ${GITHUB_WORKSPACE}/collector/cmd/collector-metrics/ xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-collector-metrics -tags "static netgo" ${GO_WORKSPACE}/collector/cmd/collector-metrics/
freebsd/amd64: export GOOS = freebsd freebsd/amd64: export GOOS = freebsd
freebsd/amd64: export GOARCH = amd64 freebsd/amd64: export GOARCH = amd64

Loading…
Cancel
Save