build.sh 667 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. set -ex
  3. cd "$(dirname "$0")"
  4. # shellcheck source=ci/env.sh
  5. source ../ci/env.sh
  6. # shellcheck source=ci/rust-version.sh
  7. source ../ci/rust-version.sh
  8. ../ci/docker-run-default-image.sh docs/build-cli-usage.sh
  9. ../ci/docker-run-default-image.sh docs/convert-ascii-to-svg.sh
  10. ./set-solana-release-tag.sh
  11. # Build from /src into /build
  12. npm run build
  13. echo $?
  14. # Publish only from merge commits and beta release tags
  15. if [[ -n $CI ]]; then
  16. if [[ -z $CI_PULL_REQUEST ]]; then
  17. eval "$(../ci/channel-info.sh)"
  18. if [[ -n $CI_TAG ]] && [[ $CI_TAG != $BETA_CHANNEL* ]]; then
  19. echo "not a beta tag"
  20. exit 0
  21. fi
  22. ./publish-docs.sh
  23. fi
  24. fi