We need to run `apt-get update` first before trying to install packages.
We did update the package index when we built the base image, but that
might have been some time ago so that the index is now outdated.
Some additional items arose from this:
* Adds a command-line-tests unit test which does some basic sanity tests
on `kmc`.
* Cleans up some of the error reporting infrastructure in `kmc` to
ensure that thrown errors are handled better.
* Removes redundant subshell from `builder_run_action`.
Fixes: #12846
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`.