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.
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...
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
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.
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.
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.)
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.
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.
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.
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.
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`
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.
This change also refactors `triggerBuilds` to use the definitions
from `trigger-definitions.config`. Jenkins configurations are
identified by the suffix `_Jenkins`.