feat(iso): append auto-incrementing _RCn suffix to ISO filenames

Rebuilds of the same version overwrote the previous ISO under an
identical filename, making a flashed stick indistinguishable from a
newer build. The builder now keeps a per-version RC counter (next to
the build counter) and names outputs like
archipelago-installer-1.7.101-alpha-unbundled-x86_64_RC2.iso.
Override with RC=n env when re-cutting a specific candidate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago 2026-07-16 10:17:11 -04:00
parent 5cb53ade66
commit 0aa9463b36

View File

@ -3613,10 +3613,27 @@ echo " Step 5 complete (GRUB + ISOLINUX configured)"
echo ""
echo "Step 6: Creating bootable ISO..."
if [ "$UNBUNDLED" = "1" ]; then
OUTPUT_ISO="$OUTPUT_DIR/archipelago-installer-${BUILD_VERSION}-unbundled-${ARCH}.iso"
# Release-candidate suffix: rebuilds of the SAME version used to overwrite
# the previous ISO under an identical filename, so a flashed stick was
# indistinguishable from a newer build. Auto-increment an RC counter per
# version (persists next to the build counter); override with RC=n env.
RC_COUNTER_FILE="/opt/archipelago/rc-counter-${BUILD_VERSION}"
if [ -n "${RC:-}" ]; then
RC_NUM="$RC"
else
OUTPUT_ISO="$OUTPUT_DIR/archipelago-installer-${BUILD_VERSION}-${ARCH}.iso"
if [ -f "$RC_COUNTER_FILE" ]; then
RC_NUM=$(( $(cat "$RC_COUNTER_FILE") + 1 ))
else
RC_NUM=1
fi
fi
echo "$RC_NUM" | sudo tee "$RC_COUNTER_FILE" > /dev/null 2>/dev/null || true
echo " Release candidate: RC${RC_NUM}"
if [ "$UNBUNDLED" = "1" ]; then
OUTPUT_ISO="$OUTPUT_DIR/archipelago-installer-${BUILD_VERSION}-unbundled-${ARCH}_RC${RC_NUM}.iso"
else
OUTPUT_ISO="$OUTPUT_DIR/archipelago-installer-${BUILD_VERSION}-${ARCH}_RC${RC_NUM}.iso"
fi
# Use the proven MBR code for hybrid USB boot