This solves the underlying problem of builds not working on my machine.
Seems the environment isn't fully set after calling `nvm use`, so we have
to either `sleep 1` or wait for the process to end (which this change
does).
This fixes the build on my Windows machine. Previously `nvm install/use`
for whatever reason caused Windows no longer be able to find `node`
thus causing the build to fail. This change when run on Windows first
checks the current node version and installs it only if it is not
installed.
This change allows to build with emscripten if offline (when
passing the `--offline` parameter). Previously this failed because
as part of locating emscripten we try to pull the latest repo
version and install the desired emscripten version. With this change
when `--offline` is specified we try to use the currently installed
version of emsdk. If it isn't installed or if the wrong version
is installed we will fail the build.
`nvm install` will fail if trying to build while offline. This
change tries to use the required node version first and if that
fails installs and then uses it.
The --full-test parameter in kmcmplib build.sh has not been working.
This PR reconnects the parameter and also enables it by default for CI
test builds (not release builds).
Fixes: #12623
Note: build.sh updated to make sure that test:help build action:target
doesn't also call test.sh by adding `:_all` meta-target.
Note: CI will need a new help-keyman-com.sh build step to deploy web
engine help.
Fixes: #12347
One of the traps prevents debugging a build script in
the `bashdb` debugger. This change skips trapping `err` and `exit`
when run under a debugger and so allows to debug the script with `bashdb`.
A lot of the `configure` actions rely on node dependencies and so call
`npm install`. Without a internet connection this hangs forever, even
if you had successfully installed the dependencies before and nothing
changed since then. This change adds a `--offline` parameter that passes
`--prefer-offline` to npm, which causes npm to use the cached
dependencies.
Also sets the `MESON_PACKAGE_CACHE_DIR` environment variable so that all
(sub-)projects share the same package cache dir. This will speed up regular
builds a bit (e.g. `developer/src/kmcmplib` and `core` both have `icu4c`
as a dependency), but will also help with offline builds.
`MESON_PACKAGE_CACHE_DIR` requires Meson 1.3, however older Meson
versions ignore this environment variable and simply continue to use a
cache per subproject, so will continue to work (minus offline builds).
Sometime ago we lost the ability to detect git remotes that use ssh
(git@github.com:keymanapp/keyman.git) and we only detect remotes that
use https (https://github.com/keymanapp/keyman.git). This change restores
this ability.
Also add some empty lines between the different parts of the error message.
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
# Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
# Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes