Skip to content

Commit

Permalink
Merge pull request #24 from carlpett/fix-accidental-cgo
Browse files Browse the repository at this point in the history
Disable CGO always
  • Loading branch information
carlpett authored Jul 10, 2019
2 parents 06f4159 + 28302a7 commit 29287c6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export CGO_ENABLED = 0
VERSION = $(shell git describe --tags --match='v*')

CROSSBUILD_OS = linux windows darwin
Expand All @@ -20,15 +21,15 @@ test:

build:
@echo ">> building binaries"
@CGO_ENABLED=0 go build -o terraform-provider-sops
@go build -o terraform-provider-sops

crossbuild: $(GOPATH)/bin/gox
@echo ">> cross-building"
@gox -arch="$(CROSSBUILD_ARCH)" -os="$(CROSSBUILD_OS)" -output="binaries/{{.OS}}_{{.Arch}}/terraform-provider-sops_$(VERSION)"
@echo ">> cross-building"
@gox -arch="$(CROSSBUILD_ARCH)" -os="$(CROSSBUILD_OS)" -output="binaries/{{.OS}}_{{.Arch}}/terraform-provider-sops_$(VERSION)"

$(GOPATH)/bin/gox:
# Need to disable modules for this to not pollute go.mod
@GO111MODULE=off go get -u github.com/mitchellh/gox
# Need to disable modules for this to not pollute go.mod
@GO111MODULE=off go get -u github.com/mitchellh/gox

release: crossbuild bin/github-release
@echo ">> uploading release ${VERSION}"
Expand Down

0 comments on commit 29287c6

Please sign in to comment.