Commit graph

901 commits

Author SHA1 Message Date
Marc Durdin
551e24c01c
Merge pull request #7339 from keymanapp/chore/common/builder-extra-params-cherry-pick
chore(common): builder extra params support 🏗 🍒
2022-09-21 14:44:09 +10:00
Marc Durdin
2a2c852fab
Merge pull request #7334 from keymanapp/feat/common/builder-feature-tests
feat(common): builder trap-functionality testing 🏗️
2022-09-21 14:44:00 +10:00
Marc Durdin
a9b08480e3 chore(common): builder extra params support 2022-09-21 13:52:06 +10:00
Joshua A. Horton
e23bf6b649 chore(common): trap test cleanup post-rebase 2022-09-21 09:40:37 +07:00
Joshua A. Horton
c1bd242047 chore(common): Merge branch 'refactor/common/builder_has_vs_start' into feat/common/builder-feature-tests 2022-09-21 09:35:51 +07:00
Joshua Horton
825cd3c8e9
chore(common): typo fix 2022-09-21 09:24:53 +07:00
Joshua A. Horton
5147ca9159 chore(common): Merge branch 'refactor/web/low-level-build-scripts' into refactor/common/builder_has_vs_start 2022-09-21 09:12:40 +07:00
Joshua A. Horton
82ac924070 feat(common): extra test - errors within functions 2022-09-21 08:45:13 +07:00
Joshua A. Horton
c4d924aa73 chore(common): cleanup, review adjustments 2022-09-21 08:39:21 +07:00
Joshua A. Horton
f6a480c6e6 chore(common): Merge branch 'refactor/web/low-level-build-scripts' into feat/common/builder-feature-tests 2022-09-21 08:31:34 +07:00
Joshua A. Horton
f7c399aa96 change(common): more adjustments per PR review 2022-09-21 08:30:32 +07:00
Marc Durdin
a3129adedc refactor(common): rename builder_has_action and document
* `builder_has_action` renamed to `builder_start_action`
* `builder_report` renamed to `builder_finish_action`
* `builder_has_action` created to be a silent test for the action
* Added reasonably comprehensive documentation.
2022-09-21 10:21:35 +10:00
Joshua A. Horton
636e69b841 feat(common): builder trap-functionality testing 2022-09-20 15:46:25 +07:00
Joshua A. Horton
6aaad72d11 docs(common): tweak to new func doc-comments 2022-09-20 13:52:24 +07:00
Joshua A. Horton
5c51597a04 feat(common): _builder_match_action 2022-09-20 13:47:02 +07:00
Joshua A. Horton
7bc5220495 change(common): minor tweak to msg 2022-09-20 13:31:30 +07:00
Joshua A. Horton
675bd60d83 fix(common): trap with set -e + func use, feat: report on uncompleted actions 2022-09-20 13:13:36 +07:00
Joshua A. Horton
12ac0df573 chore(common): low-hanging requested changes 2022-09-20 12:07:14 +07:00
Joshua A. Horton
ccf2919bb4 feat(web): report-scoping no longer option; is perma-on 2022-09-20 10:56:01 +07:00
Joshua A. Horton
2f639ecc9c feat(common): builder report scoping option 2022-09-20 10:10:51 +07:00
Joshua A. Horton
2bea392baa feat(common): builder_-managed failure-trap 2022-09-20 09:23:38 +07:00
Joshua A. Horton
256b21f691 feat(common): builder current-action tracking 2022-09-20 09:08:02 +07:00
Joshua A. Horton
29e24493bc fix(common): color option needed for builder_describe 2022-09-20 08:52:12 +07:00
Joshua A. Horton
4399548df0 feat(common): DESCRIBE_TERM_START, _END 2022-09-20 08:30:33 +07: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
Marc Durdin
a4ca7968b9 chore(common): make scripts executable and add pre-commit test 2022-09-19 13:59:09 +10:00
Darcy Wong
b5708a9251 chore(common): Update to Unicode 15.0
Update to Unicode 15.0 characters from https://www.unicode.org/Public/15.0.0/ucd/
2022-09-16 11:42:16 +07:00
Marc Durdin
4434cdc30d chore(web): disable browserstack on non-web-specific builds
Because BrowserStack tests are unreliable, I am disabling them for any
builds that are not specifically targeting web. Two ways that the tests
can be enabled:

1. Include '(web)' in the PR title
2. Include the label test-browserstack

This only impacts builds in the CI test environment, not anything else.

See build-utils-ci.inc.sh for helper functions for accessing PR
metadata, and build-utils-ci.test.sh for unit tests for this
functionality.
2022-09-11 07:19:18 +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
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
0a22acd0e4
Merge pull request #7018 from keymanapp/chore/common/builder-tweaks
chore(common): build-utils.sh minor tweaks
2022-08-03 20:19:42 +10:00
Marc Durdin
6f37f93c10 chore(common): add wasm test build trigger 2022-08-01 14:50:36 +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
Eberhard Beilharz
9f7b85834a
chore(linux): Update resources/shellHelperFunctions.sh
Somehow missed this with the previous commit.

Co-authored-by: Marc Durdin <marc@durdin.net>
2022-07-28 09:20:35 +02:00
Eberhard Beilharz
420cc0814d
chore(linux): Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-07-28 09:19:25 +02: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
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
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
35adc5b970
Merge pull request #6630 from keymanapp/chore/developer/js-to-lmc
chore(developer): rename developer/js to developer/kmlmc 🎢
2022-07-06 05:42:19 +10:00
Marc Durdin
cb94639ebb fix(common): trigger builds correctly for stable builds 2022-06-26 14:33:36 +10:00
Marc Durdin
ec690f47f9
Merge branch 'master' into chore/developer/js-to-lmc 2022-06-25 09:34:27 +10:00