phpDocs auto deployment: Remove latest commit check for pull requests

See https://developer.github.com/v3/pulls/#get-a-single-pull-request
> Each time the pull request receives new commits, GitHub creates a merge
> commit to *test* whether the pull request can be automatically merged into
> the base branch. (This *test* commit is not added to the base branch or the
> head branch.) The  attribute holds the SHA of the *test*
> merge commit; however, this attribute is deprecated and is scheduled for
> removal in the next version of the API.

 holds the SHA of the  merge commit and not of the
latest commit of the head branch, therefore the comparison fails. We could
theoretically compare it against this attribute, but as of its deprecation,
this is a pretty bad idea. Thus we remove the latest commit check for pull
requests.
This commit is contained in:
Daniel Rudolf 2015-11-26 02:38:29 +01:00
parent 45dcf32fa7
commit 8005efdbbb

View file

@ -6,7 +6,7 @@ if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then
fi
if [[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]]; then
echo "Skipping phpDoc deployment because this branch is not permitted to deploy"
echo "Skipping phpDoc deployment because this branch ($TRAVIS_BRANCH) is not permitted to deploy"
exit
fi
@ -16,7 +16,7 @@ if [ "$TRAVIS_SECURE_ENV_VARS" != "true" ]; then
fi
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
PHPDOC_REF="heads/$TRAVIS_BRANCH"
PHPDOC_REF="heads/$TRAVIS_BRANCH @ $TRAVIS_COMMIT"
PHPDOC_REF_TEXT="$TRAVIS_BRANCH branch"
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
@ -36,6 +36,6 @@ generate-phpdoc.sh \
[ $? -eq 0 ] || exit 1
deploy-phpdoc.sh \
"$TRAVIS_REPO_SLUG" "$PHPDOC_REF @ $TRAVIS_COMMIT" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" \
"$TRAVIS_REPO_SLUG" "$PHPDOC_REF" "$TRAVIS_BUILD_DIR/build/phpdoc-$PHPDOC_ID" \
"$TRAVIS_REPO_SLUG" "gh-pages" "phpDoc/$PHPDOC_ID"
[ $? -eq 0 ] || exit 1