Commit graph

30 commits

Author SHA1 Message Date
Marc Durdin
2ce3bb4fbd chore: add from and to params to increment-version 2024-02-15 13:12:56 +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
8c28b96c9f chore(common): convert resources/build/version to ES Modules
Fixes #9677.
2023-10-04 12:21:35 +07:00
Eberhard Beilharz
b8d0777800
chore(linux): Remove package build on Jenkins for Keyman 17 2023-08-01 15:03:47 +02:00
Marc Durdin
350808bd5d chore(common): fixup tests and various typo tweaks
When running tests, discovered a number of typos in builder.inc.sh.

Also fixup pathing for builder include for all scripts under resources/
to ensure that we can maximize performance.
2023-03-13 09:43:09 +07:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Eberhard Beilharz
8caa73c500
feat(linux): Add debian packaging GHA 2023-02-06 17:12:43 +01: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
98caa4e848 chore: git tag with release@semver
Follow-up from #8031.
2023-01-18 16:02:07 +07: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
767927bf16 chore(common): use /usr/bin/env bash
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.

This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:

```
if [[ -v _builder_params[$e] ]]; then
```
2022-07-25 14:59:37 +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
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
de0ccca69b chore: increment-version.sh for stable 2021-03-22 15:42:39 +11: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
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
4cffea7a24 chore(common/resources): cleanup script filenames 2020-05-19 17:39:17 +10:00
Marc Durdin
4a2e8e1673 fix(common): npm install required for auto inc lerna versions 2020-05-06 16:36:41 +10:00
jahorton
f6df4f480c feat(common): auto-update for package versioning 2020-05-04 14:17:06 +07:00
Marc Durdin
25ae1ad9d3 chore: tweak path control 2020-03-09 20:48:29 +11:00
Marc Durdin
2356c65d01 feat(common): sentry release control
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.
2020-03-09 20:40:46 +11:00
Eberhard Beilharz
caed499d09 fix(ci): Fix increment-version.sh script
trigger-builds.sh now makes use of the definitions in
trigger-definitions.config. Therefore we need to make those definitions
available.
2020-02-22 20:54:54 +01:00
Eberhard Beilharz
71616cbcee
chore(linux): allow to trigger Jenkins build from script
This change also refactors `triggerBuilds` to use the definitions
from `trigger-definitions.config`. Jenkins configurations are
identified by the suffix `_Jenkins`.
2020-02-20 16:34:14 +01:00
Marc Durdin
f583034d31 chore(ci): ensure latest history is uploaded in ci 2020-02-07 09:50:05 +11:00
Marc Durdin
ade5243ebd chore(ci): Add triggerBuilds to increment-version 2020-02-03 12:40:43 +11:00
Marc Durdin
6e8ce1c38d chore: add version tags 2020-02-03 10:14:08 +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
Marc Durdin
ef02b1bdda chore: address review comments 2020-01-31 20:01:46 +11:00
Marc Durdin
15621041d4 feat: setup automatic merge keyman-server
PRs from keyman-server will be automatically approved
and merged. Also tidies up other GitHub bits and pieces.
2020-01-31 12:23:34 +11:00