Skip to content

Commit

Permalink
Add script to build static binaries for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jepio committed Sep 17, 2024
1 parent 6784b00 commit a8c7804
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

configs=(
"windows amd64"
"windows arm64"
"linux amd64"
"linux arm64"
"darwin arm64"
)

mkdir -p bin
for config in "${configs[@]}"; do
read -r goos goarch <<<"$config"
echo $goos $goarch
output=bin/azure-keyvault-pgp-${goos}-${goarch}
if [ "$goos" == "windows" ]; then
output+=".exe"
fi
GOOS=$goos GOARCH=$goarch CGO_ENABLED=0 go build -o "$output"
done

0 comments on commit a8c7804

Please sign in to comment.