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
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
- 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
- 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
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
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
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
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
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
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.
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
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
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.
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
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