use Make + XGO to build static binaries. attempt #3

pull/102/head
Jason Kulatunga 4 years ago
parent 5be3407489
commit d6c1d4aa04

@ -67,7 +67,7 @@ freebsd/386: GOARCH = 386
freebsd/386: CGO_ENABLED = 1 freebsd/386: CGO_ENABLED = 1
freebsd/386: freebsd/386:
mkdir -p /build mkdir -p /build
env env
@echo "building web binary (OS = $(OS), ARCH = $(ARCH))" @echo "building web binary (OS = $(OS), ARCH = $(ARCH))"
go build -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -o /build/scrutiny-web-$(OS)-$(ARCH) -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go go build -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -o /build/scrutiny-web-$(OS)-$(ARCH) -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go

Loading…
Cancel
Save