CI: fix 32 bit ARM builds
This commit is contained in:
parent
6df602fa6b
commit
d5c2b07e49
|
@ -31,20 +31,22 @@ go-build:
|
|||
stage: build
|
||||
script: |
|
||||
for platform in $PLATFORMS ; do
|
||||
echo "BUILDING $platform"
|
||||
IFS="/" read GOOS GOARCH <<< "$platform"
|
||||
case $GOARCH in
|
||||
armv*)
|
||||
GOARM=$(tr -cd "0-9" <<< $GOARCH)
|
||||
GOARCH=arm
|
||||
SUFFIX="$GOOS-${GOARCH}v$GOARM"
|
||||
export GOARM
|
||||
;;
|
||||
*)
|
||||
SUFFIX="$GOOS-$GOARCH"
|
||||
unset GOARM
|
||||
;;
|
||||
esac
|
||||
export GOOS GOARCH
|
||||
for bin in $CMDS ; do
|
||||
echo "BUILDING $bin for $platform"
|
||||
go build -ldflags="-s -w" -trimpath -o bin/$bin-$SUFFIX ./cmd/$bin
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue