diff --git a/.github/workflows/steamify-iso.yml b/.github/workflows/steamify-iso.yml index d4fb38f..7b292a3 100644 --- a/.github/workflows/steamify-iso.yml +++ b/.github/workflows/steamify-iso.yml @@ -39,7 +39,10 @@ jobs: fetch-depth: 0 - name: Steamify on the ISO (its newest release) - run: ./steamify-prepare.sh + run: | + ./steamify-prepare.sh + # One moment for the ISO's label (profiledef.sh) and the release's name. + echo "STEAMIFY_BUILD_STAMP=$(date -u +%Y%m%d_%H%M)" >> "$GITHUB_ENV" - name: Build run: | @@ -54,12 +57,12 @@ jobs: run: | iso="$(ls out/desktop/*.iso | head -n 1)" [ -f "$iso" ] || { echo "::error::no ISO in out/desktop"; exit 1; } - date="$(basename "$iso" | grep -oE '[0-9]{4}\.[0-9]{2}\.[0-9]{2}')" steamify="$(sed -n 's/^VERSION=//p' archiso/airootfs/usr/local/share/steamify/steamify.sh | head -n 1)" [ -n "$steamify" ] || { echo "::error::no Steamify version on the ISO"; exit 1; } api="${{ github.server_url }}/api/v1/repos/${{ github.repository }}" exists() { curl -fsS -o /dev/null -H "Authorization: token $TOKEN" "$api/releases/tags/$1"; } - stamp="$date-$(date -u +%H%M)" # the ISO's date, the time of this run (UTC): every build its own name + b="$STEAMIFY_BUILD_STAMP" # YYYYMMDD_HHMM (UTC), the same moment as the ISO's label + stamp="${b:0:4}.${b:4:2}.${b:6:2}-${b:9:4}" # every build its own name if [ "${{ github.ref }}" = refs/heads/master ]; then tag="v$steamify-$stamp" prerelease=false name="CachyOS with Steamify Live ISO $steamify ($stamp UTC)" else @@ -76,7 +79,7 @@ jobs: { echo "Built $(date -u '+%F %H:%M UTC') from \`$(git rev-parse --short HEAD)\` (${{ github.ref_name }}), with Steamify $steamify." echo - echo "SHA-256: \`$(cut -d' ' -f1 "$iso.sha256")\`" + echo "SHA-256: \`$(cut -d' ' -f1 "$iso.sha256")\`, label \`STEAMIFY_${steamify//./_}_$b\`" echo echo "$section" } > release-notes.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c32e2..f700044 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ Its version is the Steamify version on it plus the build date and time (a releas **Features:** -* **ISO:** called `steamify-cachyos--x86_64.iso`; CachyOS Hello installs it like CachyOS's own +* **ISO:** called `steamify-cachyos--x86_64.iso`, labelled after the Steamify version on it and the build time (`STEAMIFY_2_9_1_20260929_1432`, was CachyOS's `COS_`); CachyOS Hello installs it like CachyOS's own release (the build date is kept in `/etc/steammachine-iso-build`) * **Installer (CachyOS - Steamify Installer):** * A Steamify page after the packages page: which Steam Machine parts to set up (rows from diff --git a/archiso/profiledef.sh b/archiso/profiledef.sh index a6be25b..2b72809 100644 --- a/archiso/profiledef.sh +++ b/archiso/profiledef.sh @@ -2,7 +2,14 @@ # shellcheck disable=SC2034 iso_name="steamify-cachyos" -iso_label="COS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)" +# The label follows the release name: the Steamify version on the ISO (steamify-prepare.sh put it there) +# plus the build date and time, e.g. STEAMIFY_2_9_1_20260929_1432 (ISO 9660: at most 32 characters, +# A-Z 0-9 _). STEAMIFY_BUILD_STAMP (YYYYMMDD_HHMM, UTC) from the release workflow, so both name the same +# moment; built by hand, the time now. +_steamify="$(sed -n 's/^VERSION=//p' "${BASH_SOURCE[0]%/*}/airootfs/usr/local/share/steamify/steamify.sh" 2>/dev/null | head -n 1)" +_stamp="${STEAMIFY_BUILD_STAMP:-$(date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d_%H%M)}" +iso_label="STEAMIFY_${_steamify:+${_steamify//./_}_}${_stamp}" +iso_label="${iso_label:0:32}" iso_publisher="CachyOS " iso_application="Steamify CachyOS Live (based on CachyOS)" iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"