Commit graph

22 commits

Author SHA1 Message Date
Marc Durdin
0988a86fa4 maint(resources): improve builder_launch to allow for arbitrary parameters
Also cleans up reporting of child scripts and links the list of reserved
parameters across a few locations. Address review comments.
2025-11-14 10:44:35 +01:00
Marc Durdin
c573709ee6 maint(resources): add build timing report to builder
This is enabled automatically for CI builds, and can be enabled with
`--timing` parameter otherwise. Also, adds `builder_launch`,
documentation to come.

Test-bot: skip
2025-11-10 11:03:45 +01:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Eberhard Beilharz
1f88da7deb
maint(resources): add build.sh to run all resource/build/test tests
Also adjust scripts to output standard pass message.
2025-07-10 15:22:50 +02:00
Marc Durdin
8145c017d7 feat(resources): support ignoring unknown options in builder
Fixes: #14200
Test-bot: skip
2025-06-24 07:12:09 +10:00
Eberhard Beilharz
d307051836
Merge pull request #13854 from keymanapp/maint/common/versionvars
Previously the builder scripts defined a readonly `VERSION` environment variable for the Keyman version. That caused problems when another (external) script tried to define a `VERSION` variable. We encountered this problem when trying to move the TC build steps of a configuration into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and renames `VERSION` → `KEYMAN_VERSION` etc. as well as `TIER` → `KEYMAN_TIER`. Unfortunately these variables are used in a lot of places, so this turned out to be a bit of a yak shave.
2025-05-12 08:58:19 +02:00
Eberhard Beilharz
907a16012c
maint(common): output start/end messages if not running on TC
If we're not running on TC we should output the start/end messages as
headings unless it's a child build. This was the previous behavior
before we added support for TC blocks.
2025-05-08 17:01:00 +02:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Joshua Horton
849014687b
Merge pull request #13827 from keymanapp/maint/common/local-builds-as-debug
maint(common): automatically set --debug option for local-environment builder-script uses
2025-05-07 10:17:59 +07:00
Eberhard Beilharz
adace45fac
maint(common): fixed tests 2025-05-06 16:29:42 +02:00
Joshua Horton
519a5b79e9 maint(common): address builder.sh test script review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-05-05 12:36:01 +07:00
Joshua Horton
85046ceb6d fix(common): builder.inc.sh test script patchup for automatic local --debug 2025-05-02 15:37:39 +07:00
Eberhard Beilharz
92a903ddd8
maint(common): add support for TC blocks
This change adds support for TC blocks of service messages
(https://www.jetbrains.com/help/teamcity/service-messages.html#Blocks+of+Service+Messages)
and starts/ends a block in the `builder_start_action`/`builder_finish_action`
functions. We output the TC block service messages only if we're running
on TC, i.e. if the `TEAMCITY_GIT_PATH` environment variable is set.

Part-of:  #13399
Test-bot: skip
2025-04-30 20:39:09 +02:00
Marc Durdin
118a947882 chore(common): add support for build target platform exclusions
Add `builder_describe_platform` function to builder.inc.sh, associated
documentation and unit test, and use it in Developer and Common build
scripts.

Relates-to: #11755
2024-08-07 09:25:56 +07:00
Eberhard Beilharz
0de84b69c1
fix(common): output correct parameter values
Previously with the right number of parameters that take values and the
right order it could happen that a parameter value got replaced by an
action when the script output the parameters. This change fixes this.

Fixes: #11676
2024-06-04 16:34:03 +02:00
Marc Durdin
d7cafae5ed feat(common): improve builder parameter passing for child and dep builds
Fixes #11408.
Fixes #11394.
2024-05-09 13:54:17 +07:00
Marc Durdin
58db259fd3 chore(common): typo in test 2024-05-02 15:54:34 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
92899752c6 fix(common): add unit test for --debug flag for builder
Fixes #10957. The builder --debug flag appears to be passed correctly,
according to this test. This is a good test to keep, so won't remove it,
but there is something else going on in the base test.
2024-03-11 05:44:45 -05:00
Marc Durdin
8499956754
Update resources/build/test/test.sh 2023-04-29 12:58:39 +10:00
Marc Durdin
74f9276695 chore(common): run common and resources tests
This sets us up to run all common/ and resources/ tests from a single
script, common/build.sh. This test will be run on each platform for all
changes made in common/ or resources/.

Also renamed files and paths for consistency in resources/ and updated
tests accordingly.
2023-04-28 14:07:34 +07:00
Renamed from resources/build/tests/builder.inc.test.sh (Browse further)