Commit graph

45 commits

Author SHA1 Message Date
Marc Durdin
fdc2cd438e chore: workaround release inc build block
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.
2024-02-15 12:51:02 +07:00
Marc Durdin
4f44ac6e2a fix: path for ESM increment-version, and exit code
* 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
2023-10-11 09:39:03 +07:00
Marc Durdin
d4e4992714 chore(common): cleanup final Typescript non-ESM metadata
Fixes #9262.
2023-10-04 12:55:51 +07:00
Marc Durdin
fbd9a4b5e8 chore(common): convert resources/build/version to ES Modules
Fixes #9677.
2023-10-04 11:50:53 +07:00
dependabot[bot]
7d08b08fb2
chore(deps): bump semver from 7.3.8 to 7.5.2
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-24 12:37:06 +00:00
Joshua A. Horton
a3752dd9ff chore(common): full-repo ts-node update 2023-02-09 12:39:15 +07:00
Joshua A. Horton
878e0f0ea2 chore(common): updates typescript to 4.9.5 2023-02-09 08:40:52 +07:00
Marc Durdin
067028cec2 chore: revise tag variable name to VERSION_GIT_TAG
Introduce new $VERSION_GIT_TAG environment variable, and update all
references to release@version in all projects to use the new variable.
2023-01-21 17:02:50 +07:00
Marc Durdin
ec12469487
Merge pull request #7776 from keymanapp/chore/cleanup-history
chore: cleanup history
2022-11-21 17:20:45 +11:00
Marc Durdin
de0179ca39 fix: automatically merge changes to history back to master
Fixes #7351.
2022-11-21 10:20:22 +11:00
Marc Durdin
4355a9ff1c chore: use local history instead of PR title 2022-11-21 09:48:56 +11:00
Marc Durdin
9168d896e7 chore(common): remove unused ncc dependency
The `build:dist` script was never used; increment-version.sh uses only
`build:ts`.
2022-09-19 14:47:37 +10:00
dependabot[bot]
ea50559fc1
chore(deps): bump @actions/core from 1.8.2 to 1.9.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-18 19:58:19 +00:00
Marc Durdin
9147bf3a48 chore: fix version increment for force parameter 2022-06-15 14:55:45 +10:00
Marc Durdin
a9c5b4ecb7 fix(common): update increment-version for new tsc, node versions
* 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.
2022-06-13 15:54:18 +10:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10:00
Marc Durdin
d8f81cbdf1 chore(common): improve PR reporting of changes
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.
2022-05-17 10:43:07 +10:00
Marc Durdin
0fbf53f8d7 chore(web): move version from package.json to keyman-version package
Starts to resolve the chaos of putting version numbers into every
package.json file.

Adds a new keyman-version package which mimics the
version information in build-utils.sh. This will eventually replace
resources/web-environment.

Fixes the build for the lexical model compiler tools to remove refs to
package.json version and use keyman-version instead.

More fixes coming in a follow-up.
2022-04-17 06:47:39 +10:00
Marc Durdin
4d94786852 chore(web): replace lerna with npm workspaces and ts projects
Fixes #6320.

Part 1 of moving from lerna to a simpler, maintained monorepo solution,
using TypeScript Projects and NPM Workspaces.

There is more work to be done here. At this point, KeymanWeb builds and
runs without errors, but the built file is substantially different,
mostly in include order.

Using TypeScript Projects, we move away from the need to run build
scripts in various locations for almost all the Typescript modules.

TODO: Embedded versions and tests have not been verified.

TODO: developer/server is not yet verified.

TODO: developer/js (needs a rename!) is not yet verified.

TODO: Currently, the predictive-text folder needs refactoring to move
the construction of the worker wrapper out of the Predictive Text build
and into the final assembly of keymanweb.js (as it should be valid to
run it as a separate .js anyway).

TODO: Most of the `<reference>` paths need to be re-verified. Ideally
there should be no references outside the current module for any given
.ts.

TODO: The embedded vs browser vs node (headless) builds should be tidied
up for consistency so that it's obvious what depends on what. This is
currently messiest in the predictive-text folder, where the output names
diverge from the filenames and the various files are mixed in the same
folder (as evidenced by the exclusions listed in each tsconfig.json).

TODO: `npm install` should be removed from most build scripts and
instead `npm ci` (#6196) should be run only once from the top-level
folder for any given build. I've had eliminated side-effects from the
`install` action for npm, which makes it easier to reason about state.

TODO: verify_npm_setup and related functions can probably be eliminated.

TODO: most of the build scripts should be largely eliminated for web.

TODO: several ts projects use inconsistent output folders.

TODO: it may be possible to generate a .d.ts for models/types so that
we can use a consistent reference for those as well.

TODO: build.sh, tsconfig.json should always be in the module's top-level
folder, not in a subfolder such as src (e.g. see input-processor/src,
keyboard-processor/src, web/source).

TODO: resources/web-environment should be in common/web.

TODO: other js node_modules imports should be wrapped like es6-shim.

TODO: fix up the publish code for npm modules

TODO: eliminate version numbers from package.json if possible?

Whew, that's most of the stuff I noticed!
2022-04-12 21:02:33 +10:00
Marc Durdin
3eceea8735 fix(common): report more log detail in increment-version
Relates to #6391.

Adds some logging so we may be able to find out why we are getting
strange results for some PRs.
2022-03-24 08:52:10 +11:00
dependabot[bot]
c9bc409b42
chore(deps): bump node-fetch in /resources/build/version
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 05:25:46 +00:00
dependabot[bot]
a7f17946be
chore(deps): bump ansi-regex in /resources/build/version
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 18:02:36 +00:00
Marc Durdin
92336aaa19 chore: fix git date param 2021-08-19 16:52:52 +10:00
Marc Durdin
2b367cf496 chore(common): more on report-history
* Adds support for reporting historical release ranges (--from, --to)
* Filters emoji out of titles
* Uses HISTORY.md formatting for report-history
2021-08-19 16:49:47 +10:00
Marc Durdin
85c3a424a7 chore(common): history reporting fixes
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.
2021-08-19 11:16:13 +10:00
Marc Durdin
ff8ac35106 chore(common): add report-history.sh
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.
2021-07-30 17:35:04 +10:00
Marc Durdin
7ef751fe20 chore(common): report-history mode for version.js
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)
2021-07-29 16:46:04 +10:00
jahorton
68f817a2af fix(common): resource-build-version yargs audit 2021-07-02 15:30:41 +07:00
dependabot[bot]
b537c759f9
chore(deps): bump y18n from 4.0.0 to 4.0.1 in /resources/build/version
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 23:59:19 +00:00
Marc Durdin
000867e89b chore(common): allow forced version increment
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.
2021-02-25 06:28:32 +11:00
Marc Durdin
42511c442e chore: whitespace 2021-02-12 15:44:07 +11:00
Marc Durdin
09ace08f7e fix(windows): tsysinfox64 not signed
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.
2021-02-12 14:20:41 +11:00
Marc Durdin
14d6cc0fab chore: add logging 2021-02-11 14:42:48 +11:00
Marc Durdin
daa07c1b99 chore: add timeout as well 2021-02-11 14:40:18 +11:00
Marc Durdin
9975e8a215 fix(common): create GitHub comments serially 2021-02-11 14:27:06 +11:00
Marc Durdin
6ec78ac4c1 feat(common): annotate PRs with build links
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.
2020-12-22 14:42:26 +11:00
Marc Durdin
bcb63ed232 fix(common): increment version needs to check base
The version history collector got confused because of commits
on two branches and needs to differentiate when asking for
the latest PR on a branch.
2020-12-16 06:19:56 +11:00
Marc Durdin
b888a6075b fix(common): improve increment-version robustness
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.
2020-12-03 10:24:19 +11:00
Marc Durdin
fb36fc3f69 chore(common): remove --first-parent when searching for PRs
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.
2020-11-26 09:49:21 +11:00
dependabot[bot]
f63831374f
chore(deps): bump @actions/core in /resources/build/version
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.2 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 17:29:43 +00:00
dependabot[bot]
3fc56a0ee5
chore(deps): bump node-fetch in /resources/build/version
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-11 18:02:30 +00:00
dependabot[bot]
91de1f7dd4
chore(deps): bump @actions/http-client in /resources/build/version
Bumps [@actions/http-client](https://github.com/actions/http-client) from 1.0.3 to 1.0.8.
- [Release notes](https://github.com/actions/http-client/releases)
- [Changelog](https://github.com/actions/http-client/blob/master/RELEASES.md)
- [Commits](https://github.com/actions/http-client/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-04-29 18:00:07 +00:00
Marc Durdin
b4344da838 chore(ci): add bullets to history 2020-02-07 09:49:49 +11:00
Marc Durdin
fad3ff2822 chore(ci): add date to history headings 2020-02-04 06:53:30 +11:00
Marc Durdin
eff292c6b3 chore(ci): increment version final
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.
2020-02-03 09:33:46 +11:00