Skip to content

Commit

Permalink
build: add GOEXPERIMENT=loopvar to build+install directives
Browse files Browse the repository at this point in the history
The prior commit made sure that no unit tests failed with the new logic
applied. We'll also update our build+install commands so all the
binaries are built with the new loop semantics.
  • Loading branch information
Roasbeef committed Oct 4, 2023
1 parent 0fc16b8 commit 79c0a23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ MIGRATE_BIN := $(GO_BIN)/migrate

COMMIT := $(shell git describe --tags --dirty)

GOBUILD := GO111MODULE=on go build -v
GOINSTALL := GO111MODULE=on go install -v
GOBUILD := GOEXPERIMENT=loopvar GO111MODULE=on go build -v
GOINSTALL := GOEXPERIMENT=loopvar GO111MODULE=on go install -v
GOTEST := GOEXPERIMENT=loopvar GO111MODULE=on go test
GOMOD := GO111MODULE=on go mod

Expand Down
4 changes: 2 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ function build_release() {
pushd "${dir}"

green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
env CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM=$arm GOAMD64="v1" go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapd
env CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM=$arm GOAMD64="v1" go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapcli
env GOEXPERIMENT=loopvar CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM=$arm GOAMD64="v1" go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapd
env GOEXPERIMENT=loopvar CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM=$arm GOAMD64="v1" go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapcli
popd

# Add the hashes for the individual binaries as well for easy verification
Expand Down

0 comments on commit 79c0a23

Please sign in to comment.