mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 16:35:33 +00:00
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
70 lines
2.5 KiB
Bash
Executable file
70 lines
2.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# shellcheck disable=SC2154 # (variables are set in builder-basic.inc.sh)
|
|
# Actions for creating a Debian source package and verifying the API.
|
|
# Used by deb-packaging.yml and api-verification.yml GHAs.
|
|
|
|
set -eu
|
|
shopt -s inherit_errexit
|
|
|
|
## START STANDARD BUILD SCRIPT INCLUDE
|
|
# adjust relative paths as necessary
|
|
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|
. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh"
|
|
## END STANDARD BUILD SCRIPT INCLUDE
|
|
|
|
. "${KEYMAN_ROOT}/linux/scripts/verify_api.inc.sh"
|
|
|
|
builder_describe \
|
|
"Helper for building Debian packages." \
|
|
"dependencies Install dependencies as found in debian/control" \
|
|
"source+ Build source package" \
|
|
"verify Verify API" \
|
|
"--gha Build from GitHub Action" \
|
|
"--bin-pkg=BIN_PKG Path and name of binary Debian package (for verify action)" \
|
|
"--git-sha=GIT_SHA The SHA of the HEAD commit, e.g. of the PR branch (for verify action)" \
|
|
"--git-base=GIT_BASE The ref of the base commit, e.g. usually the name of the base" \
|
|
" branch, e.g. master, stable-16.0 (for verify action)"
|
|
|
|
builder_parse "$@"
|
|
|
|
cd "${REPO_ROOT}/linux"
|
|
|
|
if builder_has_option --gha; then
|
|
START_STEP="::group::${COLOR_GREEN}"
|
|
END_STEP="::endgroup::"
|
|
else
|
|
START_STEP="${COLOR_GREEN}"
|
|
END_STEP=""
|
|
fi
|
|
|
|
dependencies_action() {
|
|
sudo mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
|
|
sudo rm keyman-build-deps_*_all.deb
|
|
sudo rm keyman-build-deps_*_amd64.*
|
|
# Additionally we need quilt to be able to create the source package.
|
|
# Since this is not needed to build the binary package, it is not
|
|
# (and should not be) included in `build-depends` in `debian/control`.
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install quilt
|
|
}
|
|
|
|
source_action() {
|
|
builder_echo "${START_STEP}Make source package for keyman${COLOR_RESET}"
|
|
|
|
builder_echo "${START_STEP}reconfigure${COLOR_RESET}"
|
|
./scripts/reconf.sh
|
|
builder_echo "${END_STEP}"
|
|
|
|
builder_echo "${START_STEP}Make origdist${COLOR_RESET}"
|
|
./scripts/dist.sh origdist
|
|
builder_echo "${END_STEP}"
|
|
|
|
builder_echo "${START_STEP}Make deb source${COLOR_RESET}"
|
|
./scripts/deb.sh
|
|
builder_echo "${END_STEP}"
|
|
|
|
mv builddebs/* "${OUTPUT_PATH:-..}"
|
|
}
|
|
|
|
builder_run_action dependencies dependencies_action
|
|
builder_run_action source source_action
|
|
builder_run_action verify verify_api_action
|