build.sh 941 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. #
  3. # This script is executed from within the container.
  4. #
  5. GOPATH=/go
  6. REPO_PATH=$GOPATH/src/github.com/grafana/grafana
  7. cd /go/src/github.com/grafana/grafana
  8. echo "current dir: $(pwd)"
  9. if [ "$CIRCLE_TAG" != "" ]; then
  10. echo "Building a release from tag $CIRCLE_TAG"
  11. go run build.go -buildNumber=${CIRCLE_BUILD_NUM} -includeBuildNumber=false build
  12. else
  13. echo "Building incremental build for $CIRCLE_BRANCH"
  14. go run build.go -buildNumber=${CIRCLE_BUILD_NUM} build
  15. fi
  16. yarn install --pure-lockfile --no-progress
  17. source /etc/profile.d/rvm.sh
  18. rvm use 2.1.9 --default
  19. gem install fpm -v 1.4
  20. echo "current dir: $(pwd)"
  21. if [ "$CIRCLE_TAG" != "" ]; then
  22. echo "Packaging a release from tag $CIRCLE_TAG"
  23. go run build.go -buildNumber=${CIRCLE_BUILD_NUM} -includeBuildNumber=false package latest
  24. else
  25. echo "Packaging incremental build for $CIRCLE_BRANCH"
  26. go run build.go -buildNumber=${CIRCLE_BUILD_NUM} package latest
  27. fi