1
1
mirror of https://github.com/walles/moar.git synced 2024-09-11 12:15:43 +03:00

Add a Windows executable to the release

This commit is contained in:
Johan Walles 2021-09-10 06:50:44 +02:00
parent a710033d6f
commit 46b84fb392
5 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,11 @@ VERSION="$(git describe --tags --dirty --always)"
BINARY="moar" BINARY="moar"
if [ -n "$GOOS$GOARCH" ]; then if [ -n "$GOOS$GOARCH" ]; then
BINARY="releases/$BINARY-$VERSION-$GOOS-$GOARCH" EXE=""
if [ "$GOOS" = "windows" ]; then
EXE=".exe"
fi
BINARY="releases/$BINARY-$VERSION-$GOOS-$GOARCH$EXE"
fi fi
# Linker flags version number trick below from here: # Linker flags version number trick below from here:

View File

@ -49,6 +49,7 @@ git tag --annotate "$VERSION"
# NOTE: Make sure this list matches the one in test.sh # NOTE: Make sure this list matches the one in test.sh
GOOS=linux GOARCH=386 ./build.sh GOOS=linux GOARCH=386 ./build.sh
GOOS=darwin GOARCH=amd64 ./build.sh GOOS=darwin GOARCH=amd64 ./build.sh
GOOS=windows GOARCH=amd64 ./build.sh
# Push the newly built release tag # Push the newly built release tag
git push --tags git push --tags

View File

@ -90,6 +90,7 @@ go test -timeout 20s ./...
# NOTE: Make sure this list matches the one in release.sh # NOTE: Make sure this list matches the one in release.sh
GOOS=linux GOARCH=386 ./build.sh GOOS=linux GOARCH=386 ./build.sh
GOOS=darwin GOARCH=amd64 ./build.sh GOOS=darwin GOARCH=amd64 ./build.sh
GOOS=windows GOARCH=amd64 ./build.sh
# Verify sending the output to a file # Verify sending the output to a file
RESULT="$(mktemp)" RESULT="$(mktemp)"

View File

@ -1,3 +1,4 @@
//go:build windows
// +build windows // +build windows
package twin package twin

View File

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package twin package twin