diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d346e2d..dccd2be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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