Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow non-official image repositories in ublue-rollback-helper #2014

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
# Aurora currently does not have GTS (02-11-2024)
Expand Down
Loading