Skip to content

Commit

Permalink
fix: make sure CGO_ENABLED is normally off, fixes ddev#6046
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Apr 4, 2024
1 parent bdae26f commit 15e4e73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ jobs:
version: latest
args: release --clean
env:
CGO_ENABLED: 0
DOCKER_ORG: ddev
GITHUB_TOKEN: ${{ secrets.DDEV_GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $(TARGETS): mkcert $(GOFILES)
@#echo "LDFLAGS=$(LDFLAGS)";
@rm -f $@
@export TARGET=$(word 3, $(subst /, ,$@)) && \
export GOOS="$${TARGET%_*}" GOARCH="$${TARGET#*_}" GOPATH="$(PWD)/$(GOTMP)" GOCACHE="$(PWD)/$(GOTMP)/.cache" && \
export CGO_ENABLED=$(CGO_ENABLED) GOOS="$${TARGET%_*}" GOARCH="$${TARGET#*_}" GOPATH="$(PWD)/$(GOTMP)" GOCACHE="$(PWD)/$(GOTMP)/.cache" && \
mkdir -p $(GOTMP)/{.cache,pkg,src,bin/$$TARGET} && \
chmod 777 $(GOTMP)/{.cache,pkg,src,bin/$$TARGET} && \
go build -o $(GOTMP)/bin/$$TARGET -installsuffix static $(BUILDARGS) -ldflags " $(LDFLAGS) " $(SRC_AND_UNDER)
Expand Down

0 comments on commit 15e4e73

Please sign in to comment.