Commit graph

1843 commits

Author SHA1 Message Date
Eberhard Beilharz
71af4a9636
chore(windows): Merge branch 'master' into maint/windows/addzip 2025-07-22 17:29:56 +02:00
Eberhard Beilharz
fba8797fd2
Merge pull request #14387 from keymanapp/maint/common/fixzip
Previously `add_zip_files` didn't work if the zip filename was not specified as first parameter. This change allows it to come after flags.

This will fix web release and other builds.
2025-07-22 17:16:18 +02:00
Eberhard Beilharz
96dc8e0db7
Merge pull request #14386 from keymanapp/test/common/ziptests
Some cleanup and better use of functionality of testing framework.
2025-07-22 17:15:16 +02:00
Eberhard Beilharz
39b1da2940
Merge pull request #14382 from keymanapp/maint/common/jqstandalone
`jq.inc.sh` gets also used in some scripts that don't source our builder scripts, e.g. in git hooks. This means that `builder_is_windows` is not defined. This change replaces the call of that function with a slightly modified version of the previous implementation.

Follow-up-of: #14324
2025-07-22 15:14:49 +02:00
Eberhard Beilharz
d9e788d20d
maint(common): address code review comments
- update doc in the function header
- add unit tests to show that flags are allowed anywhere now
2025-07-22 15:08:07 +02:00
Eberhard Beilharz
e7ce49a295
maint(common): fix add_zip_files if flags come before zip filename
Previously `add_zip_files` didn't work if the zip filename was not
specified as first parameter. This change allows it to come after flags.

This will fix web release builds.

Test-bot: skip
2025-07-22 10:48:27 +02:00
Eberhard Beilharz
cb6e62531e
test(common): improve zip tests
Some cleanup and better use of functionality of testing framework.
2025-07-22 10:46:35 +02:00
Eberhard Beilharz
61d30ae0b7
Merge pull request #14380 from keymanapp/refactor/common/ziptests
This makes of the testing framework added in #14345 and also renames the tests to better separate the parts of the test name.
2025-07-22 09:55:49 +02:00
Eberhard Beilharz
87d6e1273f
maint(common): fix use of jq.inc.sh in git hooks
`jq.inc.sh` gets also used in some scripts that don't source our
builder scripts, e.g. in git hooks. This means that `builder_is_windows`
is not defined. This change replaces the call of that function with
a slightly modified version of the previous implementation.

Follow-up-of: #14324
Build-bot: skip
Test-bot: skip
2025-07-21 18:16:51 +02:00
Eberhard Beilharz
67a7c69324
refactor(common): use test framework for zip tests
This makes of the testing framework added in #14345 and also renames
the tests to better separate the parts of the test name.

Build-bot: skip
Test-bot: skip
2025-07-21 16:50:49 +02:00
Eberhard Beilharz
1ed4af1f7f
test(common): add unit test for reporting test failures
I added a unit test as part of #14345 but then forgot to commit it.

Follow-up-of: #14345
Build-bot: skip
Test-bot: skip
2025-07-21 16:44:07 +02:00
Darcy Wong
c6ecb256ba
Merge pull request #14377 from keymanapp/fix/android/tc-missing-zip.inc
fix(android): use correct path to zip.inc.sh for CI
2025-07-21 19:30:24 +07:00
Eberhard Beilharz
4a2cf53fbc
maint(windows): replace use of wzzip with add_zip_files
This makes use of the new functionality refactored in the previous
commit by replacing the use of the `wzzip` function with `add_zip_files`.

Test-bot: skip
2025-07-21 10:26:31 +02:00
Eberhard Beilharz
501c666d7d
maint(windows): consider GO_FAST env variable
This changes makes use of the logic that used to be in `win/zip.inc.sh`:
if the environment variable `GO_FAST` is set to 1, we use a low
compression level, resulting in faster builds. If it is set to 0 we
use maximum compression, resulting in slower builds. If `GO_FAST` is
not set we don't specify the compression level and rely on the defaults.

Test-bot: skip
2025-07-21 10:26:30 +02:00
Eberhard Beilharz
51ca604b47
chore(common): Merge remote-tracking branch 'origin/master' into maint/common/14109_isOsFuncs 2025-07-21 09:20:12 +02:00
Eberhard Beilharz
dc83c013e5
Merge pull request #14345 from keymanapp/maint/resources/testframework 2025-07-21 09:17:37 +02:00
Eberhard Beilharz
982ff9b8ce
Merge pull request #14325 from keymanapp/maint/mac/write-download-info
Mac had a separate `write-download_info.sh` script that duplicates what is done in the `write_download_info` function. Also remove the unused `dl_info_display_usage` function that is unused and seems to be related to the script we're deleting.

Follow-up-of: #14270
2025-07-21 09:13:34 +02:00
Eberhard Beilharz
a53b5a4ab3
maint(common): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-07-21 09:11:58 +02:00
Eberhard Beilharz
ff275c6196
Merge pull request #14355 from keymanapp/maint/common/12526_c++17
Note that the ICU subprojects still explicitly specify C++17 since they are maintained outside of Keyman and so shouldn't be tied to the Keyman compiler version requirement.

Fixes: #12526
2025-07-21 08:36:36 +02:00
Eberhard Beilharz
fe62983cb4
Merge pull request #14352 from keymanapp/maint/common/dierelative
`7z` and `zip` behave differently if adding files that are not in the current directory. For files with relative paths, zip will add them relative to the current directory which is not what we want and can cause problems for the user. Therefore this change disallows files that are not in the current directory and aborts the build.
2025-07-21 08:35:54 +02:00
Darcy Wong
912d7e951c fix(android): use correct path to zip.inc.sh for CI 2025-07-21 09:42:37 +07:00
Eberhard Beilharz
aceb74c4aa
maint(resources): address code review comments
- return number of failed tests from `run_tests`
- add unit test for `run_tests`
- some cleanup
2025-07-18 20:23:33 +02:00
Eberhard Beilharz
faa521d82c
maint(common): set C++17 in standard.meson.build
Note that the ICU subprojects still explicitly specify C++17 since they
are maintained outside of Keyman and so shouldn't be tied to the Keyman
compiler version requirement.

Fixes: #12526
Test-bot: skip
2025-07-18 14:04:11 +02:00
Eberhard Beilharz
235b3c526e
refactor(resources): remove shellcheck warnings 2025-07-17 17:03:46 +02:00
Eberhard Beilharz
ef6adec0ed
chore(developer): Merge branch 'master' into maint/developer/usezipfunc 2025-07-15 09:43:04 +02:00
Eberhard Beilharz
33f77656de
Merge pull request #14333 from keymanapp/maint/common/zipfunc
This change adds support for the `-xr!wildcard` parameter to the `add_zip_files` function, e.g. `-xr!build.sh` will exclude all `build.sh` files from the archive. This is an alternative to adding a file list.

Also add unit tests for `zip.inc.sh`.
2025-07-15 09:37:33 +02:00
Eberhard Beilharz
3ec8ebc8f2
Merge pull request #14309 from keymanapp/maint/developer/14263_kmc-zip 2025-07-14 19:49:55 +02:00
Eberhard Beilharz
39bff3e504
maint(common): fail build if adding relative file to zip
`7z` and `zip` behave differently if adding files that are not in the
current directory. For files with relative paths, zip will add them
relative to the current directory which is not what we want and can
cause problems for the user. Therefore this change disallows files that
are not in the current directory and aborts the build.
2025-07-14 15:21:10 +02:00
Eberhard Beilharz
a1452d6ab8
maint(common): add simple unit testing framework for bash
Build-bot: skip
Test-bot: skip
2025-07-14 14:43:40 +02:00
Eberhard Beilharz
b0dd8c5920
Merge pull request #14335 from keymanapp/maint/resources/tests 2025-07-14 11:13:25 +02:00
Eberhard Beilharz
9be6128377
maint(resources): clarify description
Addresses code review comment.
2025-07-14 11:12:49 +02:00
Eberhard Beilharz
a22de0a647
maint(developer): use add_zip_files function
This makes use of `add_zip_files` where possible.

Fixes: #14332
Follow-up-of: #14093
Test-bot: skip
2025-07-10 17:53:16 +02:00
Eberhard Beilharz
b620a260c8
Merge pull request #14331 from keymanapp/maint/mac/fixrelease
We already run `build.sh publish` as part of the regular release build in `macos_build_action`, so we don't have to call it again.
2025-07-10 17:01:24 +02:00
Eberhard Beilharz
c18609914a
Merge pull request #14330 from keymanapp/maint/mac/improvetc 2025-07-10 17:00:59 +02:00
Eberhard Beilharz
16d38a0e89
docs(common): update documentation of zip.inc.sh 2025-07-10 15:27:30 +02: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
Eberhard Beilharz
d863fc4aa7
maint(common): add unit tests for zip.inc.sh 2025-07-10 14:27:30 +02:00
Eberhard Beilharz
f3206d58e4
maint(common): add support for inline file exclusions to add_zip_files
This change adds support for the `-xr!wildcard` parameter to the
`add_zip_files` function, e.g. `-xr!build.sh` will exclude all `build.sh`
files from the archive. This is an alternative to adding a file list.
2025-07-10 14:27:30 +02:00
Eberhard Beilharz
9b40e0fdbf
maint(mac): don't run build.sh publish twice
We already run `build.sh publish` as part of the regular release
build in `macos_build_action`, so we don't have to call it again.

Build-bot: skip
Test-bot: skip
2025-07-10 11:17:18 +02:00
Eberhard Beilharz
3f8dc44b73
maint(mac): fix end of blocks
Test-bot: skip
2025-07-10 11:06:22 +02:00
Eberhard Beilharz
11288f9868
maint(android): fix Android release build
Uses absolute paths for zipping files.

Follow-up-of: #14308
Build-bot: skip
Test-bot: skip
2025-07-10 10:57:00 +02:00
Eberhard Beilharz
bcc6ecc3eb
maint(mac): consolidate write-download_info
Mac had a separate `write-download_info.sh` script that duplicates what
is done in the `write_download_info` function. Also remove the unused
`dl_info_display_usage` function that is unused and seems to be related
to the script we're deleting.

Test-bot: skip
2025-07-09 19:12:29 +02:00
Eberhard Beilharz
6f737f6070
Merge pull request #14323 from keymanapp/maint/windows/14202_symbols
Fixes: #14202
2025-07-09 18:35:36 +02:00
Eberhard Beilharz
e915ccd93d
Merge pull request #14322 from keymanapp/maint/developer/fixrelease
`keyman-developer-release.sh` calls the `write_download_info` function but neglected to source the `shellHelperFunctions.sh` file which defines that function. Thus this change fixes the release build.
2025-07-09 18:35:07 +02:00
Eberhard Beilharz
b7466f7b35
Merge pull request #14321 from keymanapp/maint/windows/fixrelease
The .download_info files use the platform `win` instead of `windows`. This PR changes this, and also renames the `_verify_project` function to `_verify_platform` to better match what it's checking. Fixes Windows release builds.

Follow-up-of: #14270
2025-07-09 18:34:39 +02: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
Eberhard Beilharz
94242982fc
Merge pull request #14308 from keymanapp/maint/android/improvepaths
This is a small refactoring to use full, absolute paths when copying files and changing directories. This makes it clearer to see where those directories/files are located.
2025-07-09 16:34:03 +02:00
Eberhard Beilharz
98159ae746
maint(windows): replace hardcoded symbols paths with parameters
Only touches release build files, so skipping PR test builds.

Fixes: #14202
Build-bot: skip
Test-bot: skip
2025-07-09 16:30:18 +02:00
Eberhard Beilharz
8f0206329b
Update resources/shellHelperFunctions.sh
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2025-07-09 16:09:02 +02:00
Eberhard Beilharz
428b611eff
maint(developer): add missing include file 🩹
`keyman-developer-release.sh` calls the `write_download_info` function
but neglected to source the `shellHelperFunctions.sh` file which
defines that function. Thus this change fixes the release build.

Build-bot: skip
Test-bot: skip
2025-07-09 12:06:17 +02:00