mirror of
https://github.com/walles/moar.git
synced 2024-09-11 12:15:43 +03:00
Add Linux/arm32 builds
Fixes #122 Or actually works around rather than fixes. The fix would be to have moar packaged for Debian.
This commit is contained in:
parent
742a6ac7e3
commit
ce49d99a9a
8
build.sh
8
build.sh
@ -8,12 +8,12 @@ fi
|
||||
VERSION="$(git describe --tags --dirty --always)"
|
||||
|
||||
BINARY="moar"
|
||||
if [ -n "$GOOS$GOARCH" ]; then
|
||||
if [ -n "${GOOS}${GOARCH}" ]; then
|
||||
EXE=""
|
||||
if [ "$GOOS" = "windows" ]; then
|
||||
if [ "${GOOS}" = "windows" ]; then
|
||||
EXE=".exe"
|
||||
fi
|
||||
BINARY="releases/$BINARY-$VERSION-$GOOS-$GOARCH$EXE"
|
||||
BINARY="releases/${BINARY}-${VERSION}-${GOOS}-${GOARCH}${EXE}"
|
||||
fi
|
||||
|
||||
# Linker flags version number trick below from here:
|
||||
@ -25,4 +25,4 @@ fi
|
||||
|
||||
# This line must be last in the script so that its return code
|
||||
# propagates properly to its caller
|
||||
go build -ldflags="-s -w -X main.versionString=$VERSION" -o "$BINARY"
|
||||
go build -ldflags="-s -w -X main.versionString=${VERSION}" -o "${BINARY}"
|
||||
|
@ -48,6 +48,7 @@ git tag --annotate "${VERSION}"
|
||||
#
|
||||
# NOTE: Make sure this list matches the one in test.sh
|
||||
GOOS=linux GOARCH=386 ./build.sh
|
||||
GOOS=linux GOARCH=arm ./build.sh # Ref: https://github.com/walles/moar/issues/122
|
||||
GOOS=darwin GOARCH=amd64 ./build.sh
|
||||
GOOS=windows GOARCH=amd64 ./build.sh
|
||||
|
||||
|
5
test.sh
5
test.sh
@ -26,6 +26,11 @@ go test -timeout 20s ./...
|
||||
echo "Testing cross compilation..."
|
||||
echo " Linux i386..."
|
||||
GOOS=linux GOARCH=386 ./build.sh
|
||||
|
||||
# Ref: https://github.com/walles/moar/issues/122
|
||||
echo " Linux ARM32..."
|
||||
GOOS=linux GOARCH=arm ./build.sh
|
||||
|
||||
echo " macOS amd64..."
|
||||
GOOS=darwin GOARCH=amd64 ./build.sh
|
||||
echo " Windows amd64..."
|
||||
|
Loading…
Reference in New Issue
Block a user