chore(CI): Initial Circle CI test

This commit is contained in:
Ionitron
2015-11-18 15:25:59 -06:00
parent 2f0190371d
commit 6d45974324
10 changed files with 388 additions and 10 deletions

43
scripts/docs/deploy.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/bash
ARG_DEFS=(
"--version-name=(.*)"
)
echo "##### "
echo "##### docs/deploy.sh"
echo "#####"
function init {
cd ..
SITE_PATH=$(readJsonProp "config.json" "sitePath")
SITE_DIR=$IONIC_DIR/$SITE_PATH
}
function run {
./git/clone.sh --repository="driftyco/ionic-site" \
--directory="$SITE_DIR" \
--branch="master"
cd ..
VERSION=$(readJsonProp "package.json" "version")
gulp docs --doc-version="$VERSION_NAME"
cd $SITE_DIR
CHANGES=$(git status --porcelain)
# if no changes, don't commit
if [[ "$CHANGES" == "" ]]; then
ls
echo "-- No changes detected in docs for $VERSION_NAME; docs not updated."
else
git add -A
git commit -am "docs: update for $VERSION"
git push origin master
echo "-- Updated docs for $VERSION_NAME succesfully!"
fi
}
source $(dirname $0)/../utils.sh.inc