mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
47 lines
1.1 KiB
Bash
Executable File
47 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
function init {
|
|
RELEASE_DIR=$HOME/ionic-release
|
|
../clone/clone.sh --repository="driftyco/ionic" \
|
|
--directory="$RELEASE_DIR" \
|
|
--branch="master"
|
|
}
|
|
|
|
echo "##### "
|
|
echo "##### release/publish.sh"
|
|
echo "#####"
|
|
|
|
function run {
|
|
cd ../..
|
|
|
|
node_modules/.bin/gulp build --release --dist="$RELEASE_DIR/release"
|
|
node_modules/.bin/gulp changelog --dest="$RELEASE_DIR/CHANGELOG.md"
|
|
|
|
# Move modified files into the repo copy we're going to push
|
|
cp package.json $RELEASE_DIR
|
|
|
|
cd $RELEASE_DIR
|
|
|
|
echo "$(tail -n +2 config/CODENAMES)" > config/CODENAMES
|
|
|
|
VERSION=$(readJsonProp "package.json" "version")
|
|
CODENAME=$(readJsonProp "package.json" "codename")
|
|
|
|
replaceJsonProp "bower.json" "version" "$VERSION"
|
|
replaceJsonProp "component.json" "version" "$VERSION"
|
|
|
|
replaceJsonProp "bower.json" "codename" "$CODENAME"
|
|
replaceJsonProp "component.json" "codename" "$CODENAME"
|
|
|
|
git add -A
|
|
git commit -am "release: v$VERSION \"$CODENAME\""
|
|
git tag -f v$VERSION
|
|
|
|
git push -q origin master
|
|
git push -q origin v$VERSION
|
|
|
|
echo "-- Published ionic v$VERSION \"$CODENAME\" successfully!"
|
|
}
|
|
|
|
source $(dirname $0)/../utils.inc
|