File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,6 @@ RELEASE_TARGETS ?= "darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 linux/arm3
16
16
# # Build and compress binaries for release assets.
17
17
release-assets :
18
18
@echo " Release targets: $( RELEASE_TARGETS) "
19
- @[[ $( RELEASE_TARGETS) == * " darwin/amd64" * ]] && (echo " Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $( GO) build -ldflags " $( shell bash $( DEVGO_SCRIPTS) /version-ldflags.sh && echo $( BUILD_LDFLAGS) ) " -o $( BUILD_DIR) / $( BUILD_PKG) && cd $( BUILD_DIR) && tar zcvf ../darwin_amd64.tar.gz * && rm * ) || :
20
- @[[ $( RELEASE_TARGETS) == * " darwin/arm64" * ]] && (echo " Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $( GO) build -ldflags " $( shell bash $( DEVGO_SCRIPTS) /version-ldflags.sh && echo $( BUILD_LDFLAGS) ) " -o $( BUILD_DIR) / $( BUILD_PKG) && cd $( BUILD_DIR) && tar zcvf ../darwin_arm64.tar.gz * && rm * ) || :
21
- @[[ $( RELEASE_TARGETS) == * " linux/amd64" * ]] && (echo " Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $( GO) build -ldflags " $( shell bash $( DEVGO_SCRIPTS) /version-ldflags.sh && echo $( BUILD_LDFLAGS) ) " -o $( BUILD_DIR) / $( BUILD_PKG) && cd $( BUILD_DIR) && tar zcvf ../linux_amd64.tar.gz * && rm * ) || :
22
- @[[ $( RELEASE_TARGETS) == * " linux/arm64" * ]] && (echo " Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $( GO) build -ldflags " $( shell bash $( DEVGO_SCRIPTS) /version-ldflags.sh && echo $( BUILD_LDFLAGS) ) " -o $( BUILD_DIR) / $( BUILD_PKG) && cd $( BUILD_DIR) && tar zcvf ../linux_arm64.tar.gz * && rm * ) || :
23
- @[[ $( RELEASE_TARGETS) == * " linux/arm32" * ]] && (echo " Building Linux ARM binary" && GOOS=linux GOARCH=arm $( GO) build -ldflags " $( shell bash $( DEVGO_SCRIPTS) /version-ldflags.sh && echo $( BUILD_LDFLAGS) ) " -o $( BUILD_DIR) / $( BUILD_PKG) && cd $( BUILD_DIR) && tar zcvf ../linux_arm.tar.gz * && rm * ) || :
24
- @[[ $( RELEASE_TARGETS) == * " windows/amd64" * ]] && (echo " Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $( GO) build -ldflags " $( shell bash $( DEVGO_SCRIPTS) /version-ldflags.sh && echo $( BUILD_LDFLAGS) ) " -o $( BUILD_DIR) / $( BUILD_PKG) && cd $( BUILD_DIR) && zip -9 -j ../windows_amd64.zip * && rm * ) || :
19
+ @GO=$(GO ) RELEASE_TARGETS=$(RELEASE_TARGETS ) BUILD_DIR=$(BUILD_DIR ) DEVGO_SCRIPTS=$(DEVGO_SCRIPTS ) BUILD_PKG=$(BUILD_PKG ) bash $(DEVGO_SCRIPTS ) /release-assets.sh
25
20
26
21
.PHONY : release-assets
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ [[ " $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 * ) || :
4
+ [[ " $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 && tar zcvf ../linux_amd64.tar.gz * && rm * ) || :
6
+ [[ " $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 * ) || :
7
+ [[ " $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 * ) || :
8
+ [[ " $RELEASE_TARGETS " == * " windows/amd64" * ]] && (echo " Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $GO build -ldflags " $( bash $DEVGO_SCRIPTS /version-ldflags.sh && echo $BUILD_LDFLAGS ) " -o $BUILD_DIR / $BUILD_PKG && cd $BUILD_DIR && zip -9 -j ../windows_amd64.zip * && rm * ) || :
You can’t perform that action at this time.
0 commit comments