doc: Revert the last few commits. (#3317)
Hopefully, if the boilerplate commit is empty, the script will not crash.
This commit is contained in:
parent
702db23ee0
commit
022be39a3f
|
@ -8,7 +8,7 @@
|
||||||
#
|
#
|
||||||
# NOTE: stdout/stderr might/should be discarded to not leak sensitive information.
|
# NOTE: stdout/stderr might/should be discarded to not leak sensitive information.
|
||||||
|
|
||||||
echo "Post-processing (API) documentation. DEBUG 2021"
|
echo "Post-processing (API) documentation."
|
||||||
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
|
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
|
||||||
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
|
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
|
||||||
|
|
||||||
|
@ -95,27 +95,21 @@ Build URL: https://travis-ci.com/awesomeWM/awesome/builds/${TRAVIS_BUILD_ID}"
|
||||||
git commit -m "[relevant] $COMMIT_MSG"
|
git commit -m "[relevant] $COMMIT_MSG"
|
||||||
|
|
||||||
# Commit the irrelevant changes.
|
# Commit the irrelevant changes.
|
||||||
#FIXME April 2021: Some unknown change caused the line below to misbehave.
|
mv .git ../doc
|
||||||
#FIXME Hopefully, this change will be reverted soon.
|
cd ../doc
|
||||||
#FIXME mv .git ../doc
|
|
||||||
#FIXME cd ../doc
|
|
||||||
git add --all .
|
git add --all .
|
||||||
echo BEGIN BEFORE boilerplate
|
|
||||||
BOILERPLATE_FAILED=0
|
BOILERPLATE_FAILED=0
|
||||||
git commit -m "[boilerplate] $COMMIT_MSG" || export BOILERPLATE_FAILED=1
|
git commit -m "[boilerplate] $COMMIT_MSG" || export BOILERPLATE_FAILED=1
|
||||||
echo END AFTER boilerplate $BOILERPLATE_FAILED
|
|
||||||
|
|
||||||
# Reorder/swap commits, to have "relevant" after "boilerplate".
|
# Reorder/swap commits, to have "relevant" after "boilerplate".
|
||||||
# This makes it show up earlier in the Github interface etc.
|
# This makes it show up earlier in the Github interface etc.
|
||||||
#FIXME git tag _old
|
if [ "$BOILERPLATE_FAILED" == "0" ]; then
|
||||||
#FIXME git reset --hard HEAD~2
|
git tag _old
|
||||||
#FIXME git cherry-pick _old _old~1
|
git reset --hard HEAD~2
|
||||||
RELEVANT_REV="$(git rev-parse --short HEAD)"
|
git cherry-pick _old _old~1
|
||||||
#FIXME git tag -d _old
|
RELEVANT_REV="$(git rev-parse --short HEAD)"
|
||||||
|
git tag -d _old
|
||||||
echo BEGIN BEFORE CHECKOUT
|
fi
|
||||||
git log --graph | head -n 100
|
|
||||||
echo END BEFORE CHECKOUT $RELEVANT_REV
|
|
||||||
|
|
||||||
git checkout "$BRANCH"
|
git checkout "$BRANCH"
|
||||||
OLD_REV="$(git rev-parse --short HEAD)"
|
OLD_REV="$(git rev-parse --short HEAD)"
|
||||||
|
@ -141,15 +135,10 @@ Tree: https://github.com/awesomeWM/awesome/commits/${LAST_COMMIT}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
git merge --no-ff -m "$MERGE_COMMIT_MSG" merged-update
|
git merge --no-ff -m "$MERGE_COMMIT_MSG" merged-update
|
||||||
echo BEGIN DEBUG LOG
|
|
||||||
git log --graph | head -n 100
|
|
||||||
echo END DEBUG LOG
|
|
||||||
NEW_REV="$(git rev-parse --short HEAD)"
|
NEW_REV="$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
git push origin "$BRANCH" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
|
git push origin "$BRANCH" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
|
||||||
|
|
||||||
echo PUSHED WITH RET CODE $?
|
|
||||||
|
|
||||||
# Generate compare view links.
|
# Generate compare view links.
|
||||||
# NOTE: use "\n" for line endings, not real ones for valid json!
|
# NOTE: use "\n" for line endings, not real ones for valid json!
|
||||||
COMPARE_LINKS="Compare view: https://github.com/awesomeWM/apidoc/compare/${OLD_REV}...${NEW_REV}"
|
COMPARE_LINKS="Compare view: https://github.com/awesomeWM/apidoc/compare/${OLD_REV}...${NEW_REV}"
|
||||||
|
|
Loading…
Reference in New Issue