-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(travis): update ionic-app-base on release
- Loading branch information
Showing
2 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
echo "#########################" | ||
echo "# Update ionic-app-base #" | ||
echo "#########################" | ||
|
||
ARG_DEFS=( | ||
"--version=(.*)" | ||
) | ||
|
||
function init { | ||
PROJECT_DIR=$SCRIPT_DIR/../.. | ||
TMP_DIR=$PROJECT_DIR/tmp | ||
BUILD_DIR=$PROJECT_DIR/dist | ||
|
||
APPBASE_DIR=$TMP_DIR/app-base | ||
rm -rf $APPBASE_DIR | ||
mkdir -p $APPBASE_DIR | ||
} | ||
|
||
function run { | ||
cd ../.. | ||
|
||
rm -rf $APPBASE_DIR | ||
mkdir -p $APPBASE_DIR | ||
|
||
echo "-- Cloning ionic-app-base..." | ||
git clone \ | ||
https://$GH_ORG:$GH_TOKEN@github.com/$GH_ORG/ionic-app-base.git \ | ||
$APPBASE_DIR \ | ||
--depth=10 | ||
|
||
cd $APPBASE_DIR | ||
|
||
echo "-- Updating files..." | ||
rm -rf $APPBASE_DIR/www/lib/ionic | ||
mkdir -p $APPBASE_DIR/www/lib/ionic | ||
|
||
cp -Rf $BUILD_DIR/* $APPBASE_DIR/www/lib/ionic | ||
cp -Rf $PROJECT_DIR/scss/* $APPBASE_DIR/www/lib/ionic | ||
|
||
git add -A | ||
git commit -am "release: update ionic to v$VERSION" | ||
git push -q origin master | ||
|
||
echo "-- ionic-app-base files updated to v$VERSION successfully!" | ||
} | ||
|
||
source $(dirname $0)/../utils.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters