Commit graph

31 commits

Author SHA1 Message Date
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10: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
Marc Durdin
ac6eb0b767 chore: use explicit node: prefix for node imports
This makes it easier for us to enumerate modules that have node
dependencies. There may be others I have not yet picked up.
2025-04-03 08:01:08 +07:00
Eberhard Beilharz
3056128c14
chore(common): create flag file without node
Addresses code review comments.
2024-09-30 14:51:24 +02:00
Eberhard Beilharz
d552b44a9d
chore(common): use node to touch file
The previous attempt failed when building on Windows. Using node should
work everywhere.
2024-09-27 22:32:33 +02:00
Eberhard Beilharz
968c9716f9
chore(common): improve configuration detection for hextobin
This improves #12440. The previous change was a bit fragile if we updated
commander versions. This change now implements a better solution that
doesn't rely on dependencies and their locations for detecting if we need
to run the `configure` action for hextobin.
2024-09-27 16:29:28 +02:00
Eberhard Beilharz
17912a5429
fix(common): add proper configure output for hextobin
This change fixes a dependency problem when building Core. Previously
this failed on a clean source tree because hextobin was missing
dependencies but didn't run its `configure` action if the top-level
`node_modules` folder did already exist.
2024-09-17 11:52:52 +02:00
Joshua A. Horton
01fa0675ef chore(web): centralizes on a single @types/node, as it caused a TS typing conflict 2024-05-15 16:00:35 +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
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Steven R. Loomis
10275e699d fix(common): hextobin should return an error status 2023-12-14 15:49:01 -06:00
Marc Durdin
d4e4992714 chore(common): cleanup final Typescript non-ESM metadata
Fixes #9262.
2023-10-04 12:55:51 +07:00
Marc Durdin
8c28b96c9f chore(common): convert resources/build/version to ES Modules
Fixes #9677.
2023-10-04 12:21:35 +07:00
Marc Durdin
253dea0ba6 chore(common): fixup Commander call 2023-10-04 12:21:10 +07:00
Marc Durdin
f69f28bbd5 chore(common): convert hextobin to ES Modules
Fixes #9675.
2023-10-04 11:50:28 +07:00
Steven R. Loomis
9f9589b095 feat(developer): fix e2e test 🙀
- re-enable e2e
- fix basic.txt to match

tools (hextobin):
- support diff(block1,block2,divisor)
- document the comma rule

For: #7377
2023-06-08 13:29:15 -05:00
Marc Durdin
a2ceb98948 chore: rewrite extra standard build script prolog 2023-02-23 08:09:41 +07:00
Marc Durdin
cbb15b2cb9 chore(core): tweak scripts 2022-10-14 16:32:57 +11:00
Marc Durdin
2cf6bf3f60 chore(common): update build.sh dependencies for epic-ldml 2022-10-14 10:45:00 +11:00
Marc Durdin
6f949ad63f chore(developer): fixup dependency type changes
* xml2js, `emptyTag` property: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/59259
* semver `parse` `includePrerelease` property: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/61586#discussion_r939877412
* commander use needed to be declared for hextobin
2022-09-22 11:46:44 +10:00
Marc Durdin
cae408edc5 chore: merge feature-ldml into branch 2022-09-21 14:56:45 +10:00
Marc Durdin
93a1fc88b9 chore(developer): remove crc generation from kmc-keyboard 2022-09-19 15:30:38 +10:00
Marc Durdin
ab999ea0ba chore(common): cleanup basic.txt a bit more
Also uses `index()` to get count of strings automatically.

Reformat basic.txt to make it more readable as it will get less
'basic' over time!
2022-09-03 06:36:41 +10:00
Marc Durdin
738401cdb5 feat(common): hextobin index command
Adds an `index` command as suggested by #7186.

> Future enhancement suggestion: include ... index() for block indices
> within these repeated blocks. Would be very useful for string tables
> in the example ref.
2022-09-03 06:28:22 +10:00
Marc Durdin
702db90a71 feat(core): add version field to meta
Also adds semver package for validating the version field.
2022-09-02 14:13:10 +10:00
Marc Durdin
d141274aed chore(core): update hextobin files with new format 2022-09-02 14:06:26 +10:00
Marc Durdin
17371c3801 feat(common): add size and offset calculators to hextobin
This makes it easier to write a binary file which contains offsets and
size values. Using this for unit tests for the LDML keyboard compiler.

Example kmldmlc basic.txt is updated and included.

Future enhancement suggestion: include count() for repeated blocks and
index() for block indices within these repeated blocks. Would be very
useful for string tables in the example ref.
2022-09-02 11:37:59 +10:00
Marc Durdin
07e4f20259 chore(common): chmod +x again 2022-08-29 15:49:23 +10:00
Marc Durdin
66af0d3793 chore(common): cleanup package-lock.json 2022-08-29 15:16:55 +10:00
Marc Durdin
670229937a chore: move hextobin to common 2022-08-29 15:07:43 +10:00