Skip to content

Commit

Permalink
Fix build versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorlin committed Mar 26, 2024
1 parent 54a3948 commit 4517d25
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ jobs:
command: |
goos=("darwin" "darwin" "linux" "linux")
goarch=("arm64" "amd64" "arm64" "amd64")
for i in "${!goos[@]}"; do
mkdir -p build/${goos[$i]}-${goarch[$i]}
GOOS=${goos[$i]} GOARCH=${goarch[$i]} go build -o build/${goos[$i]}-${goarch[$i]}/lilypad-${goos[$i]}-${goarch[$i]} \
-v -ldflags=" -X 'github.com/lilypad-tech/lilypad/cmd/lilypad.VERSION=$$(git describe --tags --abbrev=0)' \
-X 'github.com/lilypad-tech/lilypad/cmd/lilypad.COMMIT_SHA=$$(git rev-parse HEAD)'"
for os in "${goos[@]}"; do
for arch in "${goarch[@]}"; do
output_dir="build/${os}-${arch}"
output_name="lilypad-${os}-${arch}"
mkdir -p "${output_dir}"
GOOS=${os} GOARCH=${arch} go build -o "${output_dir}/${output_name}" -v -ldflags="-X 'github.com/lilypad-tech/lilypad/cmd/lilypad.VERSION=$(git describe --tags --abbrev=0)' \
-X 'github.com/lilypad-tech/lilypad/cmd/lilypad.COMMIT_SHA=$(git rev-parse HEAD)'"
done
done
- persist_to_workspace:
root: build/
Expand Down

0 comments on commit 4517d25

Please sign in to comment.