Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.
This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.
Test-bot: skip
Fixes#11220.
Replaces the sed script for matching emoji in ios prepRelease with a
tiny node project that uses emoji-regex package, to reduce future
maintenance.
Also strips lingering emoji and :xxx: emoji shortcut strings from
HISTORY.md. Note that :xxx: are not stripped programatically at this
time.
Fixes#10721.
This arose partly because of the change from release- to release@ in at
17.0.30-alpha (triggered by sentry req). Will require a corresponding
patch to CI script to pass the --from and --to parameters.
* Fixes the path for the increment-version module
* Uses exit code 50 instead of 1 to indicate 'success, but no change',
so that low-value error exit codes as used by node.js don't
indavertently continue the build
* Addresses some Typescript-specific breaking changes in destructured
types.
* Removes npm version calls and package*.json updates -- these are no
longer required.
* Adds resources/build/version as a workspace to root package.json.
* Runs `npm ci` on the repo root for resources/build/version.
* Adds additional logging.
Fixes#6391.
The issue here was quite nuanced: where we merged a PR, and then merged
the changes into an earlier PR, but left it open, the earlier PR could
end up getting the release information comment from keyman-server
instead of the later, merged PR. This was because the commit would
appear in both PRs, so GitHub would report on both of them.
This is not a 100% fix -- but it should stop the PR tagging on unmerged
pull requests. The one situation where this may leave a gap is where we
have multiple PRs merged on the same day, where a later PR's changes are
merged into an earlier PR; in this case I think it is possible that one
of the PRs will not get the informative version comment.
But given the current fix should avoid the more common situation, I am
comfortable to leave it as is for now. This is only informative data...
and a more complete fix is a distraction.
1. Adds parsing of commit comments to extract PR title + number.
2. Uses `--first-parent` to exclude merges that are not to the
base branch. This means that if you merge a PR into another, that
child PR will not be listed in the history. From my perspective, this
is fine -- we prefer chained PRs to be merged bottom-up rather than
top-down, and this allows for PRs to be collapsed into one history
entry if we really want that anyway.
3. Cleans up the git log range to work correctly regardless of your
current branch.
4. Reads git log information from origin/base rather than base.
Note: this assumes that you have recently `git fetch origin` (or
`git pull origin`); that's up to you.
Relates to #5172.
Adds a report-history.sh script to help report on what changes will be
in the upcoming build. Uses the same strategy as we currently use to
grab pull request numbers for HISTORY.md.
Also fixes duplicate entries that sometimes appear in HISTORY.md due to
merges from master into PR branches.
Adds a report-history mode for version.js so we can examine the list of
changes that will be in the next release build for a release branch
(master, beta, stable-x.y).
How to run:
pushd resources/build/version
npm install
npm run build:ts
popd
node resources/build/version/lib/index.js report-history -t "$GITHUB_TOKEN" -b "$base"
* Note: Always run from repo root.
* Where $GITHUB_TOKEN is a personal access token
* Where $base, if specified is the branch to validate (default: master)
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#4484.
tsysinfox64 was being signed, but too late in the build
process as it is embedded into tsysinfo.exe. There was
code to sign it earlier, but that was being skipped due
to a missing build flag. This has been a problem for
some time.
Fixes#4201.
This adds a comment to pull requests with information about which build
a particular PR will be landing in, based on the HISTORY.md we have
already updated.
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.
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.