Commit graph

6 commits

Author SHA1 Message Date
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
Eberhard Beilharz
3b136fcec9
maint(common): consolidate functions to determine OS
- add `builder_is_windows`, `builder_is_macos` and `builder_is_linux`
  functions
- add/move `BUILDER_OS` env variable to `resources/builder.inc.sh`
- use the new functions and env variable

Fixes: #14109
Test-bot: skip
2025-07-09 18:33:09 +02:00
Marc Durdin
b003e7b4bf chore(common): builder_describe and builder_parse should come first
builder_describe and builder_parse should come before other tests, so
that (a) scripts can return --help details, and (b) so that
builder.inc.sh can tell that the script is a valid builder script, even
if environment means that the script will not otherwise run.
2024-05-02 15:54:32 +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
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
Marc Durdin
958f12386d chore(common): add win/mac/linux common build.sh parent scripts
Currently, there are no tests that will run but these scripts will at
least give us a starting point for future code.
2023-03-14 13:10:06 +07:00