Allows us to manually run a version increment, for example if there is
a problem with a release build such as running out of space on the
download server.
Fixes#4061.
Four things:
1. Reorder the script steps so that builds are triggered before the PR
is created. This should not really be necessary, but I am seeing some
evidence that TeamCity is not respecting the commit sha we request to
build. (This arose with 14.0.194 where a build agent became
unavailable during a build and TC cancelled and restarted the build,
but from a later revision... which this particular fix may not help,
I guess...)
2. Add debug logging so we can see exactly which commit sha that we
send to TeamCity
3. Handle errors in version increment by aborting the script with an
error.
4. Add a -f force mode which we can use to trigger a build even if no
changes are detected. This will need a corresponding patch in TC.
This centralises linking the current commit to the
tagged version. It will be called automatically when
we increment the version, just before a build is
done. This allows us to tag the built projects with
the version in question in Sentry.
This change also refactors `triggerBuilds` to use the definitions
from `trigger-definitions.config`. Jenkins configurations are
identified by the suffix `_Jenkins`.
This prepares a PR with updated history and version
for auto-merge. Any new PRs are merged into HISTORY.md
but existing entries are left untouched. Thus, we can
tweak wording in HISTORY.md at any time without the
effort of figuring out which PRs need to be present
manually.