[land-bot] Introduce an autogen amendment step and update version numbers using it
Summary:
This ensures version bump changes are atomic in the git history, rather than
a series of version bump commits that we have today.
This autogen amendment behavior can be leveraged for other changes such as
linting, doc regeneration, and other mechanical tasks that do not need their
own commit.
Test Plan:
Generate a test script to be the version bump generator. This emulates someone
else landing a version bump revision:
TEMP_SCRIPT=$(mktemp) (cat <<EOF set -euxo pipefail sed -i 's/VERSION 0.22.3/VERSION 0.22.4/g' ~/projects/bitcoin-abc/CMakeLists.txt export GIT_AUTHOR_NAME="Someone Else" export GIT_AUTHOR_EMAIL="no-email@bitcoinabc.org" export GIT_COMMITTER_NAME="Someone Else" export GIT_COMMITTER_EMAIL="no-email@bitcoinabc.org" git commit -am "bump version" EOF ) > "${TEMP_SCRIPT}" chmod +x "${TEMP_SCRIPT}"
Test:
./automated-commits.sh "${TEMP_SCRIPT}" git show
Verify the following:
- Version is bumped in: CMakeLists.txt, both AUR PKGBUILD files, and release notes.
- Release notes is archived.
- Commit message is preserved as "bump version".
- Both author and committer are preserved as "Someone Else".
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D7527