deploy.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. echo "##### "
  3. echo "##### ci/deploy.sh"
  4. echo "#####"
  5. function run {
  6. cd ../..
  7. export IONIC_DIR=$PWD
  8. # If --verbose is set on this script, export it to all the scripts
  9. export VERBOSE=$VERBOSE
  10. git config --global user.name 'Ionitron'
  11. git config --global user.email hi@ionicframework.com
  12. git show $CIRCLE_SHA1~1:package.json > .package.tmp.json
  13. OLD_VERSION=$(readJsonProp ".package.tmp.json" "version")
  14. VERSION=$(readJsonProp "package.json" "version")
  15. if [[ "$OLD_VERSION" != "$VERSION" ]]; then
  16. #./scripts/bump/release.sh --new-version="$VERSION"
  17. IS_RELEASE=true
  18. VERSION_NAME=$(readJsonProp "package.json" "version")
  19. else
  20. #./scripts/bump/nightly.sh --build-number=$BUILD_NUMBER
  21. IS_RELEASE=false
  22. VERSION_NAME="nightly"
  23. fi
  24. export IS_RELEASE=$IS_RELEASE
  25. export OLD_VERSION=$OLD_VERSION
  26. # Install gulp globally for site deploy script.
  27. # npm install -g gulp
  28. if [[ "$IS_RELEASE" == "true" ]]; then
  29. echo "RELEASE DETECTED!"
  30. # TODO bump version number, github release, changelog, CDN, docs nav update
  31. fi
  32. # Update docs
  33. ./scripts/docs/deploy.sh --version-name="$VERSION_NAME"
  34. }
  35. source $(dirname $0)/../utils.sh.inc