Commit graph

44 commits

Author SHA1 Message Date
Marc Durdin
003f23d7b4 feat(developer): fixup and prepare build scripts and docs for kmc 2022-09-19 06:36:06 +10:00
Marc Durdin
8e5ce35f4d feat(developer): kmldmlc compiler and tests for transforms
Adds compilers and minimal unit tests for transform sections bksp,
finl, ordr, and tran, and cleans up problems in the corresponding
builders.

Adds a utility script for building test fixtures for manual analysis:
  ./build.sh build-fixtures

Refactors constants to give us design-time type safety once more.
2022-09-06 10:15:31 +10:00
Marc Durdin
748a4ca63f chore(common): fixup support for options which have no variable param 2022-08-24 09:55:26 +10:00
Marc Durdin
026809f9ad chore(common): remove debug code 2022-08-24 03:58:16 +10:00
Marc Durdin
e27bf34c7d chore(common): tweak variable parameter support 2022-08-24 03:58:15 +10:00
Marc Durdin
8ab42029d0 chore(common): add variable support for --options in builder script 2022-08-24 03:58:14 +10:00
Marc Durdin
5c3e11d10b chore(common): add comment for builder_use_color 2022-07-30 06:01:47 +10:00
Marc Durdin
683d8b9e68 chore(common): build-utils.sh minor tweaks
Fixing up a number of minor bits and pieces identified during demo:

* invalid action or :target would not be picked up if paired with a
  valid one (e.g.: build:foo should not have worked)
* colors defined in both shellHelperFunctions and build-utils were
  problematic; able to remove them from shellHelperFunctions because
  all references included both scripts
* builder_has_action and builder_report now allow both `action:target`
  and `action :target`
* keyman-version/build.sh did not have working test action...
2022-07-29 17:37:19 +10:00
Marc Durdin
c1118d908c
Merge branch 'master' into chore/common/builder-script-target-and-option-support 2022-07-29 10:37:18 +10:00
Marc Durdin
ba6bc677cd chore(common): tweak build help and color support 2022-07-29 10:35:18 +10:00
Marc Durdin
a00c9a9a85 chore(common): disable debug flag 2022-07-29 05:45:08 +10:00
Marc Durdin
3fa1701db3 chore(common): tweak defaults for builder
Default action is 'build' unless overridden in builder_describe.
Default target is all targets when no target is specified in command-
line.
2022-07-28 14:20:25 +10:00
Eberhard Beilharz
9232c20569
chore(linux): address review comments
This change also slightly modifies `echo_heading` and outputs a
mark. This will show to the left of the line as well as in the
scroll bar in a terminal in VSCode [[1]] and will help to find the
headings if you have a lot of output in between.

[1]:https://code.visualstudio.com/updates/v1_69#_setmark-sequence-support
2022-07-27 12:22:55 +02:00
Marc Durdin
8fd3442fe2 chore(common): remove builder_init
builder_init was unnecessarily and inconsistently duplicating
builder_describe and builder_parse functionality. Removing it -- all
scripts should use builder_describe and builder_parse instead, which
gives us more flexibility and consistency into the future.
2022-07-27 15:07:12 +10:00
Marc Durdin
93a03acb9f chore(common): builder script :target and --option support
Adds support for :target and --option to the builder_() functions in
build-utils.sh, along with a consistent way of describing command line
parameters in short-hand form, so we can avoid the display_usage getting
out of sync with actual command line parameters.

I opted to tweak the existing usage slightly, reversing parameter order
for `builder_report`, so that we could extend `builder_report` cleanly
to support targets.

The new builder_() functions are `builder_describe` and `builder_parse`,
which should be used in place for `builder_init` where you want to
provide more detailed command-line options (for many scripts, the
defaults provided through `builder_init` may suffice).

`builder_describe` lets you set a single-line description of the script,
along with a list of parameters: `actions`, `:targets` and `--options`.
Options may also specify a shorthand form, e.g. `--option,-o`. Each
parameter may optionally include a short description, separated by
space(s) from the parameter name.

build-utils.test.sh tests the functionality of the various functions,
and provides some examples of using them.

Defaults:
* If a target is not specified in `builder_describe`, a standard target
  of `:project` will be available.
* If the user does not pass an action on the command line, then `build`
  will be used.
* If the user does not pass a target on the command line, all targets
  will have the actions applied.

Note, it is possible to have targets which do not use all actions. These
may be still be specified, but can be ignored. For example, `test:tools`
may not be an action:target that you handle in the script. At this time,
the builder_() functions do not attempt to check for this.
2022-07-25 14:31:58 +10:00
Marc Durdin
cc18058cfe chore(ios): rename run-xcodebuild to run_xcodebuild 2022-06-24 14:03:55 +10:00
Marc Durdin
0730098236 chore(ios): update ios/macos build scripts to log scripts
Adds run-xcodebuild function to wrap xcodebuild calls to keep logging
and error handling consistent. Currently used only by the iOS build; the
macOS build has a corresponding execBuildCommand function which does
pretty much the same thing (changing that would belong in a separate PR
I think and low priority.)
2022-06-24 11:37:46 +10:00
Marc Durdin
7e19405f16 chore: only set THIS_SCRIPT_PATH if THIS_SCRIPT is set 2022-05-16 06:11:29 +10:00
Marc Durdin
4f87aad344 chore(web): bulk renderer tsc cleanup
Changes the bulk renderer build script to the new standard build script
format and updates to use tsc -b. Cleans up final external <reference>s.
2022-05-16 05:50:11 +10:00
Marc Durdin
2f2d3c72c9 chore(web): move lm-worker into its own folder
This starts the reorg required for splitting the lm worker into its own
module. Tests are still not working. But builds are going.

Some decisions to be made around the final path for wrapping of the
code. I think it may be possible to do something a whole lot more
elegant by moving the wrapping process into the KMW build and leaving
the LM Worker output as a pure tsc output -- given only KMW wants the
wrapped worker anyway (tests aside). The actual wrapping code could
still be in the lm-worker folder.
2022-04-14 15:33:23 +10:00
Marc Durdin
a858c5166c feat(developer): sentry integration into server
This also tidies up the mkver.sh script and adds the
replaceVersionStrings() function to build-utils.sh for use globally.
2021-12-22 11:16:33 +11:00
Marc Durdin
4abdb64cd0 fix(ios): move sentry settings responsibility to build agent
The build agent already has the relevant `SENTRY_` environment variables
set in order to complete builds for all projects. Thus, we should
exclude these values from the xcode build. However, we need to ensure
that the `SENTRY_URL` and `SENTRY_ORG` variables are imported into the
xcode environment from the build agent environment.
2021-10-07 12:30:25 +11:00
Eberhard Beilharz
63cefab0eb
chore(linux): Improve Sentry environment setting
When running from source we set the environment to `local` when
reporting to Sentry. This change also adds the package version and
the tier as additional Sentry tags.

This is a follow-up of PR #4581.
2021-03-04 16:01:52 +01:00
Eberhard Beilharz
33bf5750b0
fix(linux): Improve version number
This change modifies the reported version number for km-config:
if km-config is installed from a debian package, the package
version will be output as well, e.g.:
`km-config version 14.0.252-beta (package version 14.0.252-1+bionic1)`

Otherwise the output will be identical to before:
`km-config version 14.0.252-beta-local`.

This change also modifies the script that sets the version number so
that builds on Jenkins are now detected in addition to TC.

This fixes #4579.
2021-03-03 20:01:34 +01:00
Darcy Wong
709e43d45c fix(android): export all the VERSION vars 2020-08-06 11:40:21 +07:00
Darcy Wong
fe09ac73fe fix(android/app): Fix environment portion of app version string
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`
2020-08-06 10:34:26 +07:00
Darcy Wong
4b153468f9 fix(android): Avoid build-utils.sh from getting called multiple times 2020-07-01 15:36:02 +07:00
Darcy
7150931dab fix(android): Address review comments 2020-07-01 11:50:31 +07:00
jahorton
50e801a45b refactor(common/resources): module for building Web's environment.inc.ts 2020-06-17 10:14:05 +07:00
jahorton
b783283321 docs(common): adds PR-review requested comments 2020-05-28 10:16:34 +07:00
jahorton
2cc013bd33 change(ios): better UPLOAD_SENTRY default implementation 2020-05-27 12:45:10 +07:00
jahorton
aaccc64f63 change(common): makes VERSION_ENVIRONMENT -> release logic common code 2020-05-25 14:08:28 +07:00
jahorton
849cda09bb feat(web): starts base-level sentry linkage/testing setup 2020-05-13 10:07:12 +07:00
Marc Durdin
e09b081a34 fix(windows): cleanup release and environment for Sentry 2020-04-20 07:07:39 +10:00
jahorton
57b7a0b3b0 refactor(web/engine): adds build-inner-core.sh, successful compilation 2020-04-03 15:47:21 +07:00
Marc Durdin
eade8c34f3 refactor(windows): Use 14.0-style versioning
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.
2020-03-18 17:25:39 +11:00
jahorton
0cf2606c17 feat(web): Functioning sourcemaps for minified 2020-03-11 09:47:14 +07:00
jahorton
23af4e2497 fix(ios): shell-script quoting 2020-03-09 08:50:13 +07:00
jahorton
4d96324764 fix(ios): prevents unbound var on SENTRY_AUTH_TOKEN check 2020-03-05 10:03:41 +07:00
jahorton
42dfee31c0 fix(ios): better unbound var check 2020-03-05 10:01:28 +07:00
jahorton
f760712031 fix(ios): Fixes build script error from unbound variable 2020-03-05 09:58:32 +07:00
jahorton
a6a6e227d3 feat(ios): Autogenerates environment.sh environment-def resource 2020-03-05 09:33:06 +07: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
77c42909c2 chore(ci): add build scripts for beta tests 2020-02-10 10:53:33 +11:00