Build scripts: Fix formatting
This commit is contained in:
parent
b472664a20
commit
26d7d2f68e
@ -38,11 +38,13 @@ generate-phpdoc.sh \
|
|||||||
[ -n "$(git status --porcelain "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID.cache")" ] || exit 0
|
[ -n "$(git status --porcelain "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID.cache")" ] || exit 0
|
||||||
|
|
||||||
# commit phpDocs
|
# commit phpDocs
|
||||||
|
echo "Committing changes..."
|
||||||
git add "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID"
|
git add "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID"
|
||||||
git commit \
|
git commit \
|
||||||
--message="Update phpDocumentor class docs for $TRAVIS_BRANCH branch @ $TRAVIS_COMMIT" \
|
--message="Update phpDocumentor class docs for $TRAVIS_BRANCH branch @ $TRAVIS_COMMIT" \
|
||||||
"$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID"
|
"$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
echo
|
||||||
|
|
||||||
# deploy phpDocs
|
# deploy phpDocs
|
||||||
github-deploy.sh "$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH" "$TRAVIS_COMMIT"
|
github-deploy.sh "$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH" "$TRAVIS_COMMIT"
|
||||||
|
@ -24,11 +24,13 @@ generate-phpdoc.sh \
|
|||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
|
||||||
# commit phpDocs
|
# commit phpDocs
|
||||||
|
echo "Committing changes..."
|
||||||
git add "$GIT_DIR/phpDoc/$PHPDOC_ID"
|
git add "$GIT_DIR/phpDoc/$PHPDOC_ID"
|
||||||
git commit \
|
git commit \
|
||||||
--message="Update phpDocumentor class docs for $TRAVIS_TAG" \
|
--message="Update phpDocumentor class docs for $TRAVIS_TAG" \
|
||||||
"$GIT_DIR/phpDoc/$PHPDOC_ID"
|
"$GIT_DIR/phpDoc/$PHPDOC_ID"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
echo
|
||||||
|
|
||||||
# update version badge
|
# update version badge
|
||||||
gnerate-badge.sh \
|
gnerate-badge.sh \
|
||||||
|
@ -34,7 +34,7 @@ fi
|
|||||||
# but it should give a basic protection without disabling concurrent builds completely
|
# 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
|
if [ -n "$CHECK_REPO_SLUG" ] && [ -n "$CHECK_REMOTE_REF" ] && [ -n "$CHECK_LOCAL_COMMIT" ]; then
|
||||||
# retrieve information using GitHub APIv3
|
# 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"
|
CHECK_API_URL="https://api.github.com/repos/$CHECK_REPO_SLUG/git/refs/$CHECK_REMOTE_REF"
|
||||||
if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
||||||
CHECK_API_RESPONSE="$(wget -O- --header="Authorization: token $GITHUB_OAUTH_TOKEN" "$CHECK_API_URL" 2> /dev/null)"
|
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
|
echo "WARNING: latest local commit '$CHECK_LOCAL_COMMIT' doesn't match latest remote commit '$CHECK_REMOTE_COMMIT'" >&2
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# push changes
|
# push changes
|
||||||
printf '\nPushing changes...\n'
|
printf 'Pushing changes...\n'
|
||||||
git push
|
git push
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ echo
|
|||||||
|
|
||||||
# check for git repo
|
# check for git repo
|
||||||
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -33,3 +33,5 @@ if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
|||||||
git config credential.helper 'store --file=.git/credentials'
|
git config credential.helper 'store --file=.git/credentials'
|
||||||
(umask 077 && echo "https://GitHub:$GITHUB_OAUTH_TOKEN@github.com" > .git/credentials)
|
(umask 077 && echo "https://GitHub:$GITHUB_OAUTH_TOKEN@github.com" > .git/credentials)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user