Commit graph

2072 commits

Author SHA1 Message Date
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
e634f20313
maint(linux): fix locate_emscripten if $EMSCRIPTEN_BASE dir missing
If the `$EMSCRIPTEN_BASE` dir is missing (which usually points to
`emsdk/upstream/emscripten`), but we have the `emsdk` root directory
with `emsdk/emsdk`, we can have everything we need to install the
desired emscripten version.

Issue #13464 describes an error where the `upstream/emscripten` directory
was missing - probably because the build got interrupted while installing
emscripten. This change fixes this.

Fixes: #13464
Test-bot: skip
2025-07-11 21:37:26 +02:00
Eberhard Beilharz
30836e750b
maint(common): add unit tests for locate_emscripten.inc.sh
Build-bot: skip
Test-bot: skip
2025-07-11 21:16:32 +02:00
Eberhard Beilharz
784941b03c
maint(common): add simple unit testing framework for bash
Build-bot: skip
Test-bot: skip
2025-07-11 20:19:48 +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
Eberhard Beilharz
479a0da739
maint(windows): fix platform name for Windows 🩹
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.

Test-bot: skip
2025-07-09 12:01:13 +02:00
Eberhard Beilharz
3c7304e8bd
maint(android): remove --ci parameter from Android release builds
PR #14264 removed the `--ci` parameter from Android builds, but forgot to
remove it for release builds. This PR fixes this.

Follow-up-of: #14264
Build-bot: skip
Test-bot: skip
2025-07-09 11:52:13 +02:00
Eberhard Beilharz
dd30a13345
maint(resources): fix triggering of builds
Fixes: #14313
Follow-up-of: #14274
Test-bot: skip
2025-07-08 13:35:15 +02:00
Eberhard Beilharz
d1124504af
maint(common): remove include of deleted tc-download-info.inc.sh
This fixes the release builds.

Follow-up-of: #14270
Build-bot: skip
Test-bot: skip
2025-07-07 21:03:33 +02:00
Eberhard Beilharz
bc7499a3e1
maint(developer): consolidate creating KMC_ZIP file
Previously we created the KMC_ZIP file twice, and one of them was
outdated. This change moves creating the zip file to
`developer/src/inst/build.sh` so that the TC build script only does the
upload.

Fixes: #14263
Test-bot: skip
2025-07-07 19:14:40 +02:00
Eberhard Beilharz
a25202530e
maint(common): consolidate write_download_info functions
Fixes: #14259
Build-bot: skip
Test-bot: skip
2025-07-07 18:51:37 +02:00
Eberhard Beilharz
38f43d84cf
refactor(common): some reformattings in shellHelperFunctions.sh
Also always include `jq.inc.sh`. The include file already has everything
we did here.

Test-bot: skip
2025-07-07 18:44:28 +02:00
Eberhard Beilharz
19ff2fd0a6
chore(resources): Merge branch 'master' into maint/resources/14201_prefixtc 2025-07-07 18:41:22 +02:00
Eberhard Beilharz
4d373c6cfe
maint(resources): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-07-07 18:41:16 +02:00
Eberhard Beilharz
24246b80ff
maint(android): use absolute paths
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.

Build-bot: skip
Build-bot: build android
Test-bot: skip
2025-07-07 17:44:59 +02:00
Eberhard Beilharz
0a5342150d
maint(android): use --release for release builds
This will fix the Android release builds. Previously we did a debug
build but then tried to copy files from the release build folder.

The original build config passed `--release` when doing a release build,
which lost when moving to build scripts.

Fixes: #14302
Build-bot: skip
Build-bot: release android
Test-bot: skip
2025-07-07 17:34:08 +02:00
Marc Durdin
8059fc769c
Merge pull request #14279 from keymanapp/maint/common/14278-trigger-common-builds-for-tc-common-changes
maint(common): trigger common builds for resources/teamcity/common changes
2025-07-04 08:34:05 +07:00
Marc Durdin
06af8b29a1
Merge pull request #14274 from keymanapp/fix/common/trigger
fix(common): fix triggering builds if no builds to start
2025-07-04 06:35:56 +07:00
Marc Durdin
f7d4c15e60
Merge branch 'master' into maint/common/14278-trigger-common-builds-for-tc-common-changes 2025-07-04 06:34:57 +07:00
Marc Durdin
94efd2c639 maint(common): trigger common builds for resources/teamcity/common changes
Also removes old paths from triggers, and updates comments on matched
patterns.

Fixes: #14278
Test-bot: skip
2025-07-04 07:58:32 +10:00
Marc Durdin
ca14da0e79 maint(common): match OSTYPE correctly on macOS
Fixes: #14276
2025-07-04 07:39:11 +10:00
Marc Durdin
139bfb2b77
Merge pull request #14271 from keymanapp/fix/core/build
fix(core): fix failing `common-test-core.sh` script
2025-07-04 04:27:47 +07:00
Marc Durdin
410fcb36e7
Merge pull request #14265 from keymanapp/refactor/resources/shebang
refactor(resources): replace shebang for TC include files
2025-07-04 04:27:21 +07:00
Marc Durdin
975759ecf6
Merge pull request #14264 from keymanapp/maint/android/removeci
maint(android): remove `--ci` parameter from android builds
2025-07-04 04:27:08 +07:00
Marc Durdin
2a1a05c7f5
Merge pull request #14272 from keymanapp/fix/ios/release
maint(ios): remove extra `cd` command from ios release builds
2025-07-04 04:26:58 +07:00
Eberhard Beilharz
cbcbae473e
fix(common): fixes triggering builds if no builds to start
If the PR only contains files that we ignore, we previously failed to
finish the trigger build. This PR fixes the problem.

The problem can be observed in #14271 which only changed a file in
`resources/teamcity/common` which gets ignored in `find_platform_changes`.

Test-bot: skip
2025-07-03 21:07:45 +02:00
Eberhard Beilharz
3e40632674
fix(mac): fix release build
Skipping builds since the changed code only affects TC release builds.

Build-bot: skip
Test-bot: skip
2025-07-03 20:32:20 +02:00
Eberhard Beilharz
4c8450a0d6
fix(ios): fix ios release builds
We did already cd into that directory a few lines above.

Build-bot: skip
Test-bot: skip
2025-07-03 20:29:11 +02:00
Eberhard Beilharz
366bd1c855
fix(core): fix failing common-test-core.sh script
Also pass `win` for Windows which will build both x86 and x64.

Test-bot: skip
2025-07-03 20:21:17 +02:00