-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c50b4f5
commit 1371d4b
Showing
2 changed files
with
16 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
.DS_Store | ||
bin/ |
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,15 @@ | ||
#!/usr/bin/env bash | ||
TARGETS="linux/386 linux/amd64 linux/arm linux/arm64 windows/386 windows/amd64 windows/arm windows/arm64 darwin/amd64 darwin/arm64" | ||
|
||
rm -rf ./bin | ||
for target in $TARGETS; do | ||
GOOS=${target%/*} | ||
GOARCH=${target#*/} | ||
echo "Building for $GOOS/$GOARCH" | ||
GOOS=$GOOS GOARCH=$GOARCH go build -o "bin/$GOOS-$GOARCH/" | ||
( | ||
cd bin/$GOOS-$GOARCH/ | ||
zip -r "../$GOOS-$GOARCH.zip" . | ||
) | ||
rm -rf "bin/$GOOS-$GOARCH/" | ||
done |