File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ BUILD_PKG ?= .
99# Override in app Makefile to control build artifact destination.
1010BUILD_DIR ?= ./bin
1111
12- export CGO_ENABLED ?= 0
13-
1412RELEASE_TARGETS ?= "darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 linux/arm32 windows/amd64"
1513
1614# # Build and compress binaries for release assets.
Original file line number Diff line number Diff line change 22
33[[ " $RELEASE_TARGETS " == * " darwin/amd64" * ]] && (echo " Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_amd64.tar.gz * && rm * ) || :
44[[ " $RELEASE_TARGETS " == * " darwin/arm64" * ]] && (echo " Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_arm64.tar.gz * && rm * ) || :
5- [[ " $RELEASE_TARGETS " == * " linux/amd64" * ]] && (echo " Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && echo " git hash-object: $( git hash-object * ) " && tar zcvf ../linux_amd64.tar.gz * && rm * ) || :
5+ [[ " $RELEASE_TARGETS " == * " linux/amd64" * ]] && (echo " Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " $LINUX_AMD64_BUILD_OPTIONS -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && echo " git hash-object: $( git hash-object * ) " && tar zcvf ../linux_amd64.tar.gz * && rm * ) || :
66[[ " $RELEASE_TARGETS " == * " linux/dbg-amd64" * ]] && (echo " Building Debug Linux AMD64 binary" && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 $GO build -race -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64_dbg.tar.gz * && rm * ) || :
77[[ " $RELEASE_TARGETS " == * " linux/arm64" * ]] && (echo " Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm64.tar.gz * && rm * ) || :
88[[ " $RELEASE_TARGETS " == * " linux/arm32" * ]] && (echo " Building Linux ARM binary" && GOOS=linux GOARCH=arm $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm.tar.gz * && rm * ) || :
You can’t perform that action at this time.
0 commit comments