2017-01-23 15:09:18 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# This script is executed from within the container.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
GOPATH=/go
|
|
|
|
|
REPO_PATH=$GOPATH/src/github.com/grafana/grafana
|
|
|
|
|
|
2017-02-24 09:22:57 +01:00
|
|
|
cd /go/src/github.com/grafana/grafana
|
2017-01-30 17:27:12 +01:00
|
|
|
echo "current dir: $(pwd)"
|
|
|
|
|
|
|
|
|
|
if [ "$CIRCLE_TAG" != "" ]; then
|
2017-01-31 10:10:25 +01:00
|
|
|
echo "Building a release from tag $CIRCLE_TAG"
|
2017-02-02 15:55:37 +01:00
|
|
|
go run build.go -buildNumber=${CIRCLE_BUILD_NUM} -includeBuildNumber=false build
|
2017-01-31 10:10:25 +01:00
|
|
|
else
|
|
|
|
|
echo "Building incremental build for $CIRCLE_BRANCH"
|
2017-02-02 15:55:37 +01:00
|
|
|
go run build.go -buildNumber=${CIRCLE_BUILD_NUM} build
|
2017-01-24 11:24:45 +01:00
|
|
|
fi
|
2017-01-23 15:09:18 +01:00
|
|
|
|
2017-02-13 15:26:10 +01:00
|
|
|
yarn install --pure-lockfile --no-progress
|
2017-01-23 15:09:18 +01:00
|
|
|
|
|
|
|
|
source /etc/profile.d/rvm.sh
|
|
|
|
|
|
2017-01-30 17:27:12 +01:00
|
|
|
echo "current dir: $(pwd)"
|
|
|
|
|
|
|
|
|
|
if [ "$CIRCLE_TAG" != "" ]; then
|
2017-01-31 10:10:25 +01:00
|
|
|
echo "Packaging a release from tag $CIRCLE_TAG"
|
2017-02-02 15:55:37 +01:00
|
|
|
go run build.go -buildNumber=${CIRCLE_BUILD_NUM} -includeBuildNumber=false package latest
|
2017-01-31 10:10:25 +01:00
|
|
|
else
|
|
|
|
|
echo "Packaging incremental build for $CIRCLE_BRANCH"
|
2017-02-02 15:55:37 +01:00
|
|
|
go run build.go -buildNumber=${CIRCLE_BUILD_NUM} package latest
|
2017-01-30 17:27:12 +01:00
|
|
|
fi
|