forked from vmware-archive/google-kms-pgp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to build static binaries for all platforms
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |