mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
chore(CI): Initial Circle CI test
This commit is contained in:
42
scripts/ci/deploy.sh
Executable file
42
scripts/ci/deploy.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "##### "
|
||||
echo "##### ci/deploy.sh"
|
||||
echo "#####"
|
||||
|
||||
function run {
|
||||
cd ../..
|
||||
export IONIC_DIR=$PWD
|
||||
|
||||
# If --verbose is set on this script, export it to all the scripts
|
||||
export VERBOSE=$VERBOSE
|
||||
|
||||
git config --global user.name 'Ionitron'
|
||||
git config --global user.email hi@ionicframework.com
|
||||
|
||||
git show $SHA1~1:package.json > .package.tmp.json
|
||||
OLD_VERSION=$(readJsonProp ".package.tmp.json" "version")
|
||||
VERSION=$(readJsonProp "package.json" "version")
|
||||
|
||||
if [[ "$OLD_VERSION" != "$VERSION" ]]; then
|
||||
# ./scripts/bump/release.sh --new-version="$VERSION"
|
||||
IS_RELEASE=true
|
||||
VERSION_NAME=$(readJsonProp "package.json" "version")
|
||||
else
|
||||
# ./scripts/bump/nightly.sh --build-number=$BUILD_NUMBER
|
||||
VERSION_NAME="nightly"
|
||||
fi
|
||||
|
||||
# Install gulp globally for site deploy script.
|
||||
npm install -g gulp
|
||||
|
||||
if [[ "$IS_RELEASE" == "true" ]]; then
|
||||
echo "RELEASE DETECTED!"
|
||||
# TODO bump version number, github release, changelog, CDN, docs nav update
|
||||
fi
|
||||
|
||||
# Update docs
|
||||
./scripts/docs/deploy.sh --version-name="$VERSION_NAME"
|
||||
}
|
||||
|
||||
source $(dirname $0)/../utils.sh.inc
|
Reference in New Issue
Block a user