Last active
April 29, 2022 07:35
-
-
Save petrjahoda/8a717989ef381e59bfbc5e7f05246a86 to your computer and use it in GitHub Desktop.
script
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
name=${PWD##*/} | |
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o linux/amd64/"$name" | |
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o linux/arm64/"$name" | |
upx --best --lzma linux/amd64/"$name" | |
upx --best --lzma linux/arm64/"$name" | |
docker rmi -f petrjahoda/"$name":latest | |
docker buildx build -t petrjahoda/"$name":latest --platform=linux/arm64,linux/amd64 . --push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment