Skip to content

Commit

Permalink
build.sh: build into a dir per version
Browse files Browse the repository at this point in the history
  • Loading branch information
fridim committed Mar 21, 2023
1 parent 26ecbec commit b7afefb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b7afefb

Please sign in to comment.