Skip to content

Commit

Permalink
feat: allow non-official image repositories in ublue-rollback-helper (u…
Browse files Browse the repository at this point in the history
…blue-os#2014)

Co-authored-by: Jorge O. Castro <[email protected]>
  • Loading branch information
cr7pt0gr4ph7 and castrojo authored Dec 9, 2024
1 parent 8ed2ba4 commit ce62461
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system_files/shared/usr/bin/ublue-rollback-helper
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ source /usr/lib/ujust/ujust.sh
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
IMAGE_TAG=$(jq -r '."image-tag"' < $IMAGE_INFO)
IMAGE_VENDOR=$(jq -r '."image-vendor"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
IMAGE_REGISTRY="ghcr.io/${IMAGE_VENDOR}"

function list_tags(){
skopeo list-tags docker://ghcr.io/ublue-os/"${IMAGE_NAME}" | grep -E --color=never -- "$FEDORA_VERSION-([0-9]+)" | sort -rV | head -n 31
skopeo list-tags "docker://${IMAGE_REGISTRY}/${IMAGE_NAME}" | grep -E --color=never -- "$FEDORA_VERSION-([0-9]+)" | sort -rV | head -n 31
}

function rebase_helper(){
base_image="ghcr.io/ublue-os/${IMAGE_NAME}"
base_image="${IMAGE_REGISTRY}/${IMAGE_NAME}"
echo "Which Tag would you like to rebase to?"
CHANNELS=(latest stable stable-daily gts)
echo "The default selection is gts, stable (weekly builds) and stable-daily (daily builds) are for enthusiasts, and latest is for testers"
Expand Down

0 comments on commit ce62461

Please sign in to comment.