Commit graph

40 commits

Author SHA1 Message Date
Marc Durdin
c524db41b9 maint(common): use builder_launch for child builds
Fixes: #15130
Test-bot: skip
2025-12-02 06:17:31 +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
5b8753e806
chore(resources): Merge branch 'master' into maint/resources/14201_prefixtc 2025-07-24 14:54:08 +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
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
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
69eede0a28
maint(resources): use tc_ prefix for all tc-*.inc.sh functions
- added `tc_` prefix to functions in `includes/tc-*.inc.sh`
- moved `includes/tc-actions.inc.sh` → `linux/linux-actions.inc.sh`
- didn't change `write_download_info`. That will be done as part of #14259.
- didn't change `is_*`. That will be done as part of #14109.
- removed unnecessary functions that only call another function.
- moved functions from `tc-windows.inc.sh` → `tc-helpers.inc.sh` because
  they are no longer Windows-specific (although currently only used for
  Windows).

Fixes: #14201
Test-bot: skip
2025-07-03 18:48:47 +02:00
Eberhard Beilharz
5a1bf52727
refactor(resources): replace shebang for include files
Include files are not directly executable, so it doesn't make sense to
have the shebang line. However, shellcheck needs to know what shell we
use. Turns out there is a shellcheck line that we can add instead of
the shebang line.

Follow-up-of: #14253
Build-bot: skip
Test-bot: skip
2025-07-03 17:57:02 +02:00
Eberhard Beilharz
52943600dc
maint(web): move rsync code to shared functions
Build-bot: skip
Test-bot: skip
2025-07-02 17:01:30 +02:00
Eberhard Beilharz
cd796fe770
chore(windows): Merge branch 'master' into maint/windows/13399_tconfig 2025-07-02 16:59:23 +02:00
Marc Durdin
533bc73312
Merge pull request #14249 from keymanapp/maint/web/14225-simplify-rsync-call-and-download-info-build
maint(web): adjust rsync path
2025-07-02 05:20:27 +07:00
Marc Durdin
3011a0816d maint(web): adjust rsync path 2025-07-02 08:12:35 +10:00
Marc Durdin
5473eb43d5
Merge pull request #14236 from keymanapp/maint/web/14225-simplify-rsync-call-and-download-info-build
maint(web): cleanup rsync call from bash for Windows agents and refactor
2025-07-01 06:04:45 +07:00
Marc Durdin
90b7c34df8 maint(web): cleanup rsync call from bash for Windows agents and refactor
Refactors the Powershell script which built the .download_info file for
web into the keyman-web-release.sh script, and then bypasses the path
rewriting that msys does when calling a Windows executable (rsync).

This was tricky because msys was mangling all the paths to Windows-style
but we specifically need to reference one remote Unix-style path in the
rsync call. As we wanted to move away from the Powershell script anyway,
it was cleaner to resolve this in one go by moving the whole script to
bash.

The new tc-download-info.inc.sh script is a minimally generalized
version of the download_info writing from keyman-linux-release.sh, and
once the dust settles, it would be good to DRY this out.

Note that this is still Windows-only, despite the rest of the build
being basically platform-agnostic. I wanted to get this stable before we
generalize, which should be fairly straightforward, as it's only the
rsync call which will be touched.

Tested locally with a drop-in Windows executable that just prints its
arguments, to verify that path mangling is not occurring where we don't
want it. The DEBUG lines in keyman-web-release.sh will be removed once
we are confident this is correct.

Fixes: #14225
2025-06-29 10:13:22 +10:00
Eberhard Beilharz
399baddf23
refactor(linux): rename linux agent specific functions
This change prefixes functions with `ba_` that are intended to be run on
a Linux build agent. That should make it easier to distinguish them from
functions that deal with building Keyman for Linux.

Test-bot: skip
2025-06-25 20:13:09 +02:00
Eberhard Beilharz
a8dedae2d1
chore(windows): Merge branch 'master' into maint/windows/13399_tconfig 2025-06-16 17:49:15 +02:00
Eberhard Beilharz
860a1c1aff
maint(developer,web): use double quotes inside the string again
However, we have to use double quotes inside of the string as well so
that it gets treated as a command with parameters instead of a single
command with spaces.

Follow-up-of: #14168
Part-of: #13399
Test-bot: skip
2025-06-13 22:02:06 +02:00
Eberhard Beilharz
bc485856c9
maint(windows): move TC configuration for Keyman Windows to scripts
Part-of: #13399
Test-bot: skip
2025-06-13 19:15:46 +02:00
Eberhard Beilharz
895883cae0
maint(developer,web): use braces for variables in powershell scripts
This changes variable references in the powershell scripts to use braces
(`${FOO}` instead of `$FOO`). This solves the problem where powershell
considers the colon in the rsync command as being part of a variable.
This should fix release builds for Web and Developer.

Also commented some unused variables.

Follow-up-of: #14167,#14168
Part-of: #13399
Test-bot: skip
2025-06-13 12:45:16 +02:00
Eberhard Beilharz
917e83d7ad
maint(web): use double quotes so that variable gets replaced
This fixes web release builds. Previously we used single quotes
for specifying `--rsync-path`. This caused the parameter to contain
the variable name instead of the content.
2025-06-12 18:32:34 +02:00
Eberhard Beilharz
bfa8165033
maint(web): add some more arguments for web release build script
Previously rsync used some TC variables. Now with the build step being
a script the TC variables are no longer accessible from the script, so
we add new arguments to the build script and then use these when calling
rsync. A similar changer was already made previously for the developer
release build.

Follow-up-of: #14049
Related: #14059
Part-of: #13399
Test-bot: skip
2025-06-12 17:40:59 +02:00
Eberhard Beilharz
1fdff7d66c
maint(web): use path when calling powershell script
Also remove the check if we're running on Windows since that is already
happening in the calling function.

Fixes: #14151
Follow-up-of: #14049
Test-bot: skip
2025-06-10 19:02:04 +02:00
Eberhard Beilharz
a4b9fe67e3
Merge pull request #14059 from keymanapp/maint/developer/13399_tc-config-dev-refactor
This adds a `configure` build step that will install any missing dependencies required to build on Linux.

Part-of: #13399 
Fixes: #14131
2025-06-06 09:35:16 +02:00
Eberhard Beilharz
962eb76ef6
Merge pull request #14051 from keymanapp/maint/web/13399_tc-config_refactor
This refactors the build script and makes some changes so that it is possible to run in a docker container on a developer's machine.

Part-of: #13399
2025-06-05 12:32:00 +02:00
Eberhard Beilharz
36fb4d30b8
maint(web): fix working directory for zipping artifacts for Web release
This fixes the Keyman for Web release builds - the script expects to be
run from `${KEYMANROOT}/web`.
2025-06-05 09:07:17 +02:00
Eberhard Beilharz
e3ebc2e05f
maint(developer): fix build errors
The mainly sneaked in by merging changes from other branches.
2025-06-04 20:58:26 +02:00
Eberhard Beilharz
a85e14feef
maint(developer): add more file headers 2025-06-04 19:53:23 +02:00
Eberhard Beilharz
ab2f7c2d30
chore(web): Merge branch 'master' into maint/web/13399_tc-config_refactor 2025-06-04 18:20:39 +02:00
Eberhard Beilharz
dc67fd7d28
maint(web): address code review comments
- update and fix file header
- renamed env variables for path to s.keyman.com/help.keyman.com to
  match what is used elsewhere
2025-06-04 16:39:56 +02:00
Eberhard Beilharz
1fa0372147
maint(web): address code review comments 2025-06-03 18:09:41 +02:00
Eberhard Beilharz
ef5d4306e8
maint(web): address code review comments from #14049
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-06-03 18:04:00 +02:00
Eberhard Beilharz
23107eab95
chore(web): Merge branch 'maint/web/13399_tc-config' into maint/web/13399_tc-config_refactor 2025-06-03 18:01:09 +02:00
Eberhard Beilharz
ed67a04ec4
maint(web): allow to specify paths as arguments
This adds command line arguments for the paths to the `s.keyman.com` and
`help.keyman.com` repos.

This deviates from sticking strictly with what's on TC so that we can
pass the desired arguments right from the start and don't have to add
another check in the TC build steps.
2025-06-03 17:37:15 +02:00
Eberhard Beilharz
58bf8557bb
maint(web): change to correct directory 2025-05-27 20:08:24 +02:00
Eberhard Beilharz
bf5909e51b
maint(web): improve TC build script for Keyman Web/Release 2025-05-27 20:04:58 +02:00
Eberhard Beilharz
c93f1355f4
maint(web): add some additional dependencies that were missing
When building playwright complained about missing dependencies, so
this change adds them.
2025-05-27 19:50:57 +02:00
Eberhard Beilharz
fd9c88fa83
maint(web): improve TC build script for Keyman Web/Test
This refactors the build script and makes some changes so that it is
possible to run in a docker container on a developer's machine.

Part-of: #13399
Test-bot: skip
2025-05-26 18:38:48 +02:00
Eberhard Beilharz
7942f3c23b
maint(web): move TC configuration for Web to script
This matches the existing TC configuration as closely as possible. It also
puts the scripts in `resources/teamcity/web`, but doesn't relocate the
Linux scripts until we decide where things should go.

Part-of: #13399
Test-bot: skip
2025-05-26 18:27:10 +02:00