build: new workflow for PR:s and branches.

This commit is contained in:
Leonard Gram
2018-07-26 16:46:36 +02:00
parent 62d3655da4
commit bfe41d3cf1
2 changed files with 81 additions and 45 deletions

View File

@@ -14,12 +14,14 @@ echo "current dir: $(pwd)"
if [ "$CIRCLE_TAG" != "" ]; then
echo "Building releases from tag $CIRCLE_TAG"
CC=${CCX64} go run build.go -includeBuildNumber=false build
OPT="-includeBuildNumber=false"
else
echo "Building incremental build for $CIRCLE_BRANCH"
CC=${CCX64} go run build.go -buildNumber=${CIRCLE_BUILD_NUM} build
OPT="-buildNumber=${CIRCLE_BUILD_NUM}"
fi
CC=${CCX64} go run build.go ${OPT} build
yarn install --pure-lockfile --no-progress
echo "current dir: $(pwd)"
@@ -28,14 +30,8 @@ if [ -d "dist" ]; then
rm -rf dist
fi
if [ "$CIRCLE_TAG" != "" ]; then
echo "Building frontend from tag $CIRCLE_TAG"
go run build.go -includeBuildNumber=false build-frontend
echo "Packaging a release from tag $CIRCLE_TAG"
go run build.go -goos linux -pkg-arch amd64 -includeBuildNumber=false package-only latest
else
echo "Building frontend for $CIRCLE_BRANCH"
go run build.go -buildNumber=${CIRCLE_BUILD_NUM} build-frontend
echo "Packaging incremental build for $CIRCLE_BRANCH"
go run build.go -goos linux -pkg-arch amd64 -buildNumber=${CIRCLE_BUILD_NUM} package-only latest
fi
echo "Building frontend"
go run build.go ${OPT} build-frontend
echo "Packaging"
go run build.go -goos linux -pkg-arch amd64 ${OPT} package-only latest