From 60dafe7e1f5000ea26fe66eaab9da91389964bf1 Mon Sep 17 00:00:00 2001 From: FrenchBen Date: Mon, 24 Jul 2017 16:20:53 -0700 Subject: [PATCH] Update CI script --- scripts/ghp.sh | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/scripts/ghp.sh b/scripts/ghp.sh index 8aa08a4..4da331f 100644 --- a/scripts/ghp.sh +++ b/scripts/ghp.sh @@ -42,21 +42,21 @@ rm -rf css rm -rf sass rm -rf scripts rm -rf test -rm *.html -rm *.json -rm *.enc -rm *.js -rm *.png -rm *.lock -rm *.ico -rm *.md -rm *.pdf +rm -f *.html +rm -f *.json +rm -f *.enc +rm -f *.js +rm -f *.png +rm -f *.lock +rm -f *.ico +rm -f *.md +rm -f *.pdf yes | rm .travis.yml -rm .bowerrc -rm .editorconfig +rm -f .bowerrc +rm -f .editorconfig rm -rf .github -rm .gitignore -rm .jshintrc +rm -f .gitignore +rm -f .jshintrc # force installation of bower packages at the root echo "{ \"directory\": \".\" }" > .bowerrc @@ -79,7 +79,7 @@ echo ${meta_temp/'COMPONENT_NAME'/$REPO_NAME} > index.html npm install bower -g bower cache clean # Install the repo and the dark-theme. -bower install ${REPO_NAME} px-dark-theme px-dark-demo-theme +bower install ${REPO_NAME} px-dark-theme px-dark-demo-theme --force-latest #copy the bower file into our root yes | cp ${REPO_NAME}/bower.json bower.json @@ -92,7 +92,7 @@ bower install # ------------------------------------------------------------------------------ # Go into the component folder we've just installed from bower -#cd ${REPO_NAME} +# cd ${REPO_NAME} # ------------------------------------------------------------------------------ # SW-PRECACHE @@ -106,15 +106,17 @@ bower install # ------------------------------------------------------------------------------ # Remember to exit out of the component before we do any git stuff -#cd ../ +# cd ../ # Do the git stuff # checkout a new orphan git checkout --orphan $TARGET_BRANCH -git add -A . -git commit -m "${GIT_COMMIT_MESSAGE}" +git add -A . > /dev/null +echo "git add done" +git commit -m "${GIT_COMMIT_MESSAGE}" --quiet +echo "git commit done" # Set git credentials (defined in settings above) git config user.name ${GIT_USER_NAME} @@ -140,3 +142,7 @@ chmod 0400 $TRAVIS_BUILD_DIR/deploy_key # Push to predix-ui/repo `gh-pages` branch (force to override out-of-date refs) ssh-add $TRAVIS_BUILD_DIR/deploy_key git push $SSH_GIT_PREDIXUI $TARGET_BRANCH --force + +sleep 120s + +curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${cloudflare_zone_identifier}/purge_cache" -H "X-Auth-Email: martin.wragg@ge.com" -H "X-Auth-Key: ${cloudflare}" -H "Content-Type: application/json" --data '{"purge_everything":true}'