Add multi-package Alpine packaging
This commit is contained in:
41
packaging/alpine/blueprint/scripts/test-install.sh
Executable file
41
packaging/alpine/blueprint/scripts/test-install.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../.." && pwd)}"
|
||||
package_name="${PACKAGE_NAME:-$(basename "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)")}"
|
||||
alpine_version="${ALPINE_VERSION:-3.23}"
|
||||
arch="${ALPINE_ARCH:-x86_64}"
|
||||
|
||||
case "${arch}" in
|
||||
x86_64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/amd64}"
|
||||
;;
|
||||
aarch64)
|
||||
platform="${ALPINE_TEST_PLATFORM:-linux/arm64}"
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported Alpine architecture: %s\n' "${arch}" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${SKIP_BUILD:-0}" != "1" ]]; then
|
||||
ALPINE_PACKAGE="${package_name}" "${repo_root}/scripts/apk/build.sh" build "${arch}"
|
||||
fi
|
||||
|
||||
docker run --rm --platform "${platform}" \
|
||||
-e "ALPINE_ARCH=${arch}" \
|
||||
-e "PACKAGE_NAME=${package_name}" \
|
||||
-v "${repo_root}/packages/local:/repo:ro" \
|
||||
"alpine:${alpine_version}" \
|
||||
sh -lc '
|
||||
set -e
|
||||
|
||||
cp "/repo/${ALPINE_ARCH}"/*.rsa.pub /etc/apk/keys/
|
||||
printf "%s\n" /repo >> /etc/apk/repositories
|
||||
apk update
|
||||
apk add "${PACKAGE_NAME}"
|
||||
|
||||
# Replace these with package-specific install assertions.
|
||||
apk info -e "${PACKAGE_NAME}"
|
||||
'
|
||||
6
packaging/alpine/blueprint/scripts/update-generated-sources.sh
Executable file
6
packaging/alpine/blueprint/scripts/update-generated-sources.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
|
||||
printf 'No generated sources for %s\n' "${package_dir}"
|
||||
Reference in New Issue
Block a user