build.sh 893 B

123456789101112131415161718192021222324252627282930313233
  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. echo "current dir: $(pwd)"
  19. if [ "$CIRCLE_TAG" != "" ]; then
  20. echo "Packaging a release from tag $CIRCLE_TAG"
  21. go run build.go -buildNumber=${CIRCLE_BUILD_NUM} -includeBuildNumber=false package latest
  22. else
  23. echo "Packaging incremental build for $CIRCLE_BRANCH"
  24. go run build.go -buildNumber=${CIRCLE_BUILD_NUM} package latest
  25. fi