diff --git a/image-recipe/_archived/build-auto-installer-iso.sh b/image-recipe/_archived/build-auto-installer-iso.sh index a85e8880..75684ad6 100755 --- a/image-recipe/_archived/build-auto-installer-iso.sh +++ b/image-recipe/_archived/build-auto-installer-iso.sh @@ -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