Build scripts: Fix formatting

This commit is contained in:
Daniel Rudolf 2016-01-14 13:35:08 +01:00
parent b472664a20
commit 26d7d2f68e
4 changed files with 11 additions and 3 deletions

View file

@ -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"

View file

@ -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 \

View file

@ -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=$?

View file

@ -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