From 63c8b1b2f268b97571894ed0e176f4bcc6ca903d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 13 Jan 2017 21:11:08 -0500 Subject: [PATCH] Add more info to build commit messages --- deploy/deploy.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 48b36d30d..75b327335 100644 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -18,28 +18,30 @@ function build { # For revert branches, do nothing if [[ "$TRAVIS_BRANCH" == revert-* ]] - echo -e "\e[36m\e[1mBuild triggered for reversion branch \"$TRAVIS_BRANCH\" - doing nothing." + echo -e "\e[36m\e[1mBuild triggered for reversion branch \"${TRAVIS_BRANCH}\" - doing nothing." exit 0 fi # For PRs, only run tests if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo -e "\e[36m\e[1mBuild triggered for PR #$TRAVIS_PULL_REQUEST to branch \"$TRAVIS_BRANCH\" - only running tests." + echo -e "\e[36m\e[1mBuild triggered for PR #${TRAVIS_PULL_REQUEST} to branch \"${TRAVIS_BRANCH}\" - only running tests." tests fi # Figure out the source of the build if [ -n "$TRAVIS_TAG" ]; then - echo -e "\e[36m\e[1mBuild triggered for tag \"$TRAVIS_TAG\"." + echo -e "\e[36m\e[1mBuild triggered for tag \"${TRAVIS_TAG}\"." SOURCE=$TRAVIS_TAG + SOURCE_TYPE="tag" else - echo -e "\e[36m\e[1mBuild triggered for branch \"$TRAVIS_BRANCH\"." + echo -e "\e[36m\e[1mBuild triggered for branch \"${TRAVIS_BRANCH}\"." SOURCE=$TRAVIS_BRANCH + SOURCE_TYPE="branch" fi # For Node != 6, only run tests if [ "$TRAVIS_NODE_VERSION" != "6" ]; then - echo -e "\e[36m\e[1mBuild triggered with Node v$TRAVIS_NODE_VERSION - only running tests." + echo -e "\e[36m\e[1mBuild triggered with Node v${TRAVIS_NODE_VERSION} - only running tests." tests fi @@ -72,7 +74,7 @@ cd out git add . git config user.name "Travis CI" git config user.email "$COMMIT_AUTHOR_EMAIL" -git commit -m "Docs build: ${SHA}" || true +git commit -m "Docs build for ${SOURCE_TYPE} ${SOURCE}: ${SHA}" || true git push $SSH_REPO $TARGET_BRANCH # Clean up... @@ -92,5 +94,5 @@ cd out git add . git config user.name "Travis CI" git config user.email "$COMMIT_AUTHOR_EMAIL" -git commit -m "Webpack build: ${SHA}" || true +git commit -m "Webpack build for ${SOURCE_TYPE} ${SOURCE}: ${SHA}" || true git push $SSH_REPO $TARGET_BRANCH