From b7afefb1320e389f729a6aaf87d573fe2854e29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Cor=C3=A9?= Date: Tue, 21 Mar 2023 09:42:16 +0100 Subject: [PATCH] build.sh: build into a dir per version --- cli/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/build.sh b/cli/build.sh index 9203b3e..4f43706 100755 --- a/cli/build.sh +++ b/cli/build.sh @@ -5,5 +5,6 @@ echo -n "Version? " read version export CGO_ENABLED=0 set -x -u -o pipefail -gox --output="build/agnosticv_{{.OS}}_{{.Arch}}" -ldflags="-X 'main.Version=${version}' -X 'main.buildTime=$(date -u)' -X 'main.buildCommit=$(git rev-parse HEAD)'" -env GOOS=darwin GOARCH=arm64 go build -ldflags="-X 'main.Version=${version}' -X 'main.buildTime=$(date -u)' -X 'main.buildCommit=$(git rev-parse HEAD)'" -o build/agnosticv_darwin_arm64 +mkdir -p build/$version +gox --output="build/${version}/agnosticv_{{.OS}}_{{.Arch}}" -ldflags="-X 'main.Version=${version}' -X 'main.buildTime=$(date -u)' -X 'main.buildCommit=$(git rev-parse HEAD)'" +env GOOS=darwin GOARCH=arm64 go build -ldflags="-X 'main.Version=${version}' -X 'main.buildTime=$(date -u)' -X 'main.buildCommit=$(git rev-parse HEAD)'" -o build/${version}/agnosticv_darwin_arm64