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:
parent
a710033d6f
commit
46b84fb392
6
build.sh
6
build.sh
@ -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:
|
||||||
|
@ -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
|
||||||
|
1
test.sh
1
test.sh
@ -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)"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package twin
|
package twin
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package twin
|
package twin
|
||||||
|
Loading…
Reference in New Issue
Block a user