From 76ee3b1ea2320523b003d21d0835ba9e9aed81f6 Mon Sep 17 00:00:00 2001 From: inffy <10782843+inffy@users.noreply.github.com> Date: Sun, 1 Feb 2026 12:28:38 +0000 Subject: [PATCH] refactor fedora version logic (#1696) --- Justfile | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index 6b17561e..2651c734 100644 --- a/Justfile +++ b/Justfile @@ -2,6 +2,9 @@ repo_organization := "ublue-os" rechunker_image := "ghcr.io/ublue-os/legacy-rechunk:v1.0.1-x86_64@sha256:2627cbf92ca60ab7372070dcf93b40f457926f301509ffba47a04d6a9e1ddaf7" common_image := "ghcr.io/get-aurora-dev/common:latest" brew_image := "ghcr.io/ublue-os/brew:latest" +stable_version := "43" +latest_version := "43" +beta_version := "43" images := '( [aurora]=aurora [aurora-dx]=aurora-dx @@ -555,14 +558,31 @@ fedora_version image="aurora" tag="latest" flavor="main" $kernel_pin="": set -eou pipefail {{ just }} validate {{ image }} {{ tag }} {{ flavor }} if [[ ! -f /tmp/manifest.json ]]; then + # Determine Version if [[ "{{ tag }}" =~ stable ]]; then - # CoreOS does not uses cosign - skopeo inspect --retry-times 3 docker://quay.io/fedora/fedora-coreos:stable > /tmp/manifest.json + VERSION="{{ stable_version }}" elif [[ "{{ tag }}" =~ beta ]]; then - skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/base-main:beta > /tmp/manifest.json + VERSION="{{ beta_version }}" else - skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/base-main:"{{ tag }}" > /tmp/manifest.json + VERSION="{{ latest_version }}" fi + + # Determine Akmods Flavor + if [[ "{{ tag }}" =~ stable ]]; then + AKMODS_FLAVOR="coreos-stable" + else + AKMODS_FLAVOR="main" + fi + + # Verify akmods existence + echo "Checking for akmods: ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${VERSION}" >&2 + if ! skopeo inspect --retry-times 3 "docker://ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${VERSION}" > /dev/null; then + echo "Error: Akmods not found for flavor ${AKMODS_FLAVOR} and version ${VERSION}" >&2 + exit 1 + fi + + # Write cache + echo "{\"Labels\": {\"org.opencontainers.image.version\": \"${VERSION}\"}}" > /tmp/manifest.json fi fedora_version=$(jq -r '.Labels["org.opencontainers.image.version"]' < /tmp/manifest.json | grep -oP '^[0-9]+') if [[ -n "${kernel_pin:-}" ]]; then