From b132f7973a6f01e6e0c6b61995f918af4cb5ee97 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Thu, 26 Mar 2026 11:05:51 +0300 Subject: [PATCH] fix(iso): derive ISO filename from iso/v* tags, not audit/v* Previously the ISO file was named after git describe --match 'audit/v*', so a new iso/ tag produced names like v1.0.9-1-gXXXXXXX instead of v1.0.17. Now build.sh has resolve_iso_version() that looks at iso/v* tags separately. The bee binary inside the ISO still uses AUDIT_VERSION_EFFECTIVE. Co-Authored-By: Claude Sonnet 4.6 --- iso/builder/build.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/iso/builder/build.sh b/iso/builder/build.sh index a113b93..a5611fa 100755 --- a/iso/builder/build.sh +++ b/iso/builder/build.sh @@ -69,7 +69,27 @@ resolve_audit_version() { date +%Y%m%d } +# ISO image versioned separately from the audit binary (iso/v* tags). +resolve_iso_version() { + if [ -n "${BEE_ISO_VERSION:-}" ]; then + echo "${BEE_ISO_VERSION}" + return 0 + fi + + tag="$(git -C "${REPO_ROOT}" describe --tags --match 'iso/v*' --abbrev=7 --dirty 2>/dev/null || true)" + case "${tag}" in + iso/v*) + echo "${tag#iso/v}" + return 0 + ;; + esac + + # Fall back to audit version so the name is still meaningful + resolve_audit_version +} + AUDIT_VERSION_EFFECTIVE="$(resolve_audit_version)" +ISO_VERSION_EFFECTIVE="$(resolve_iso_version)" # Auto-detect kernel ABI: refresh apt index, then query current linux-image-amd64 dependency. # If headers for the detected ABI are not yet installed (kernel updated since image build), @@ -101,7 +121,7 @@ fi echo "=== bee ISO build ===" echo "Debian: ${DEBIAN_VERSION}, Kernel ABI: ${DEBIAN_KERNEL_ABI}, Go: ${GO_VERSION}" -echo "Audit version: ${AUDIT_VERSION_EFFECTIVE}" +echo "Audit version: ${AUDIT_VERSION_EFFECTIVE}, ISO version: ${ISO_VERSION_EFFECTIVE}" echo "" echo "=== syncing git submodules ===" @@ -268,7 +288,7 @@ mkdir -p "${OVERLAY_STAGE_DIR}/etc" BUILD_DATE="$(date +%Y-%m-%d)" GIT_COMMIT="$(git -C "${REPO_ROOT}" rev-parse --short HEAD 2>/dev/null || echo unknown)" cat > "${OVERLAY_STAGE_DIR}/etc/bee-release" <&1 # live-build outputs live-image-amd64.hybrid.iso in LB_DIR ISO_RAW="${LB_DIR}/live-image-amd64.hybrid.iso" -ISO_OUT="${DIST_DIR}/bee-debian${DEBIAN_VERSION}-v${AUDIT_VERSION_EFFECTIVE}-amd64.iso" +ISO_OUT="${DIST_DIR}/bee-debian${DEBIAN_VERSION}-v${ISO_VERSION_EFFECTIVE}-amd64.iso" if [ -f "$ISO_RAW" ]; then cp "$ISO_RAW" "$ISO_OUT" echo ""