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.
Instead of just reporting on --first-parent, now lists all merges that
are in the log, which means we get some non-PR merges but that's ok. At
least we get all of them.
This was most visible with chained PRs which were merged bottom-up.
The background reason for this is to test a fix to the web build, where
s.keyman.com resources were not being updated since we refactored the
build configurations (sadly, the build did not die when it should have).
When displaying the Info page of alpha builds from the Play Store, we noticed the version string displayed the wrong environment:
`14.0.X-alpha-local` (CI builds should have ended with `-alpha`).
It turns out the `VERSION_` shell variables from `build-utils.sh` aren't visible in `version.gradle` (though CI environment variables like `build_counter` are visible).
This PR:
* Exports the two VERSION strings needed in version.gradle
* Updates the Info page to simply display `BuildConfig.VERSION_NAME`
Follow-on to #3300
* Update the FV Android app to use the same build script to download its default keyboard package. (fv_all.kmp)
* This means downloading fv_all.kmp is the only valid option for the build (remove option to copy/rebuild keyboards)
* Reduce the number of exports in the Bash scripts
* Also removes sil_euro_latin.kmp since the app will fallback to fv_all/sil_euro_latin (in a future PR)
Crowdin CLI doesn't extract into a temporary .crowdin-tmp folder so that can be removed. (.crowdin-tmp was used in prior Bash scripts).
Also moved note about using a VPN to the wiki https://github.com/keymanapp/keyman/wiki/Crowdin-CLI
Moves all version construction to use VERSION.md and
TIER.md and reduces intermediate file usage, so we can
present sensible versions across the project.