diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:18:04 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:18:04 +0800 |
| commit | 796c6c8a70c92d4675df7c2ec2d25ecda139d723 (patch) | |
| tree | 06c6d3e7788d7b2ad5ddd0565e2651c0c8d9d151 /tests/test-build-channel-metadata.sh | |
| parent | ab070aec5f1d760a2539e14cb19da61593bded15 (diff) | |
| parent | d734f2c746632772b794143762f2fcea78e62011 (diff) | |
| download | AeroCore-OS-796c6c8a70c92d4675df7c2ec2d25ecda139d723.tar.gz AeroCore-OS-796c6c8a70c92d4675df7c2ec2d25ecda139d723.zip | |
Merge testing into main for 44.x stable release44.20260913
Diffstat (limited to 'tests/test-build-channel-metadata.sh')
| -rw-r--r-- | tests/test-build-channel-metadata.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test-build-channel-metadata.sh b/tests/test-build-channel-metadata.sh new file mode 100644 index 0000000..75a2827 --- /dev/null +++ b/tests/test-build-channel-metadata.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +# The build recipe's positional tag must be authoritative for channel +# metadata. This protects `just build ... testing` from stale dotenv values. +grep -Fqx ' "--build-arg" "IMAGE_BRANCH={{ tag }}"' "${repo_root}/Justfile" +grep -Fqx ' "--build-arg" "VERSION_TAG={{ tag }}"' "${repo_root}/Justfile" +grep -Fqx ' "--build-arg" "VERSION_PRETTY={{ tag }}"' "${repo_root}/Justfile" +grep -Fqx ' LABELS+=("--label" "org.opencontainers.image.version={{ tag }}-${GIT_SHA}")' "${repo_root}/Justfile" +grep -Fqx ' "image-tag": "$IMAGE_BRANCH_NORMALIZED",' "${repo_root}/build_files/image-info" + +if grep -Fq ' "image-tag": "stable",' "${repo_root}/build_files/image-info"; then + echo 'image-info must not hard-code stable as the image tag' >&2 + exit 1 +fi + +echo 'Build channel metadata checks passed' |
