From 26d7d2f68edc5f0f2e04bb41719fc8e2997b9c3c Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 14 Jan 2016 13:35:08 +0100 Subject: [PATCH] Build scripts: Fix formatting --- _build/deploy-phpdoc-branch.sh | 2 ++ _build/deploy-phpdoc-release.sh | 2 ++ _build/github-deploy.sh | 6 ++++-- _build/github-setup.sh | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/_build/deploy-phpdoc-branch.sh b/_build/deploy-phpdoc-branch.sh index f65708f..16c3178 100755 --- a/_build/deploy-phpdoc-branch.sh +++ b/_build/deploy-phpdoc-branch.sh @@ -38,11 +38,13 @@ generate-phpdoc.sh \ [ -n "$(git status --porcelain "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID.cache")" ] || exit 0 # commit phpDocs +echo "Committing changes..." git add "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID" git commit \ --message="Update phpDocumentor class docs for $TRAVIS_BRANCH branch @ $TRAVIS_COMMIT" \ "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID" [ $? -eq 0 ] || exit 1 +echo # deploy phpDocs github-deploy.sh "$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH" "$TRAVIS_COMMIT" diff --git a/_build/deploy-phpdoc-release.sh b/_build/deploy-phpdoc-release.sh index 3384192..e0e7836 100755 --- a/_build/deploy-phpdoc-release.sh +++ b/_build/deploy-phpdoc-release.sh @@ -24,11 +24,13 @@ generate-phpdoc.sh \ [ $? -eq 0 ] || exit 1 # commit phpDocs +echo "Committing changes..." git add "$GIT_DIR/phpDoc/$PHPDOC_ID" git commit \ --message="Update phpDocumentor class docs for $TRAVIS_TAG" \ "$GIT_DIR/phpDoc/$PHPDOC_ID" [ $? -eq 0 ] || exit 1 +echo # update version badge gnerate-badge.sh \ diff --git a/_build/github-deploy.sh b/_build/github-deploy.sh index 993631a..61cfda0 100755 --- a/_build/github-deploy.sh +++ b/_build/github-deploy.sh @@ -34,7 +34,7 @@ fi # but it should give a basic protection without disabling concurrent builds completely if [ -n "$CHECK_REPO_SLUG" ] && [ -n "$CHECK_REMOTE_REF" ] && [ -n "$CHECK_LOCAL_COMMIT" ]; then # retrieve information using GitHub APIv3 - printf '\nChecking latest commit...\n' + printf 'Checking latest commit...\n' CHECK_API_URL="https://api.github.com/repos/$CHECK_REPO_SLUG/git/refs/$CHECK_REMOTE_REF" if [ -n "$GITHUB_OAUTH_TOKEN" ]; then CHECK_API_RESPONSE="$(wget -O- --header="Authorization: token $GITHUB_OAUTH_TOKEN" "$CHECK_API_URL" 2> /dev/null)" @@ -59,10 +59,12 @@ if [ -n "$CHECK_REPO_SLUG" ] && [ -n "$CHECK_REMOTE_REF" ] && [ -n "$CHECK_LOCAL echo "WARNING: latest local commit '$CHECK_LOCAL_COMMIT' doesn't match latest remote commit '$CHECK_REMOTE_COMMIT'" >&2 exit 0 fi + + echo fi # push changes -printf '\nPushing changes...\n' +printf 'Pushing changes...\n' git push EXIT_CODE=$? diff --git a/_build/github-setup.sh b/_build/github-setup.sh index 9dabef4..11aa76b 100755 --- a/_build/github-setup.sh +++ b/_build/github-setup.sh @@ -19,7 +19,7 @@ echo # check for git repo if ! git rev-parse --git-dir > /dev/null 2>&1; then - printf 'Not a git repo; aborting...\n\n' + printf 'Not a git repo; aborting...\n\n' >&2 exit 1 fi @@ -33,3 +33,5 @@ if [ -n "$GITHUB_OAUTH_TOKEN" ]; then git config credential.helper 'store --file=.git/credentials' (umask 077 && echo "https://GitHub:$GITHUB_OAUTH_TOKEN@github.com" > .git/credentials) fi + +echo