diff --git a/build-utils/travis-apidoc.sh b/build-utils/travis-apidoc.sh index 0ceab5ed7..47b30f3ac 100755 --- a/build-utils/travis-apidoc.sh +++ b/build-utils/travis-apidoc.sh @@ -66,7 +66,6 @@ if git diff --cached --exit-code --quiet; then fi # Commit the relevant changes. -OLD_REV="$(git rev-parse --short HEAD)" COMMIT_MSG="Update docs for $AWESOME_VERSION via Travis Last commit message: @@ -74,7 +73,6 @@ $(cd $REPO_DIR && git log -1 --pretty=format:%s) Build URL: https://travis-ci.org/awesomeWM/awesome/builds/${TRAVIS_BUILD_ID}" git commit -m "[relevant] $COMMIT_MSG" -NEW_REV="$(git rev-parse --short HEAD)" # Commit the irrelevant changes. mv .git ../doc @@ -87,15 +85,19 @@ git commit -m "[boilerplate] $COMMIT_MSG" git tag _old git reset --hard HEAD~2 git cherry-pick _old _old~1 +RELEVANT_REV="$(git rev-parse --short HEAD)" git tag -d _old git checkout "$BRANCH" +OLD_REV="$(git rev-parse --short HEAD)" git merge --no-ff -m "$COMMIT_MSG" merged-update +NEW_REV="$(git rev-parse --short HEAD)" git push --quiet origin "$BRANCH" # Generate compare view links. COMPARE_LINKS="Compare view: https://github.com/awesomeWM/apidoc/compare/${OLD_REV}...${NEW_REV}" +COMPARE_LINKS="$COMPARE_LINKS\nRelevant changes: https://github.com/awesomeWM/apidoc/commit/${RELEVANT_REV}" if [ "$BRANCH" != "gh-pages" ]; then COMPARE_LINKS="$COMPARE_LINKS\nComparison against master (gh-pages): https://github.com/awesomeWM/apidoc/compare/gh-pages...${NEW_REV}" fi