chore(travis): add demo updates

This commit is contained in:
Andy Joslin
2014-03-31 20:49:03 -06:00
parent 7560e2a6c8
commit ee791952f9
3 changed files with 29 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
ARG_DEFS=(
"[--version-name=(.*)]"
"--action=(clone|updateConfig|docs)"
"--action=(clone|updateConfig|docs|demos)"
)
function init {
@@ -76,4 +76,28 @@ function docs {
fi
}
function demos {
echo "######################################"
echo "## Updating demos for $VERSION_NAME ##"
echo "######################################"
cd $IONIC_SITE_DIR
mkdir -p demos
cp -Rf $PROJECT_DIR/demos/* demos
CHANGES=$(git status --porcelain)
VERSION=$(readJsonProp "package.json" "version")
# if no changes, don't commit
if [[ "$CHANGES" == "" ]]; then
echo "-- No changes detected in demos for $VERSION; demos not updated."
else
git add -A
git commit -am "demos: update for $VERSION"
echo "-- Updated deoms for $VERSION successfully!"
fi
}
source $(dirname $0)/../utils.inc

View File

@@ -99,6 +99,10 @@ function run {
--action="docs" \
--version-name="$VERSION_NAME"
./scripts/site/publish.sh \
--action="demos"
--version-name="$VERSION_NAME"
./scripts/cdn/publish.sh \
--version=$VERSION \
--version-name="$VERSION_NAME"

View File

@@ -4,9 +4,6 @@ echo "##############################"
echo "# Pushing release to $RELEASE_REMOTE #"
echo "##############################"
# Inspired by AngularJS's finalize-version script
# Run by travis when it detects a commit that changes package.json version
ARG_DEFS=(
"--codename=(.*)"
"--version=(.*)"