-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Generate image info for auto-signing via ublue-update
Generates information specific to the image being built. This is used for auto-signing via ublue-update but also has other practical purposes such as distuingishing which flavor or base may be in use
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -oue pipefail | ||
|
||
IMAGE_REF="docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME" | ||
|
||
case $FEDORA_MAJOR_VERSION in | ||
38) | ||
IMAGE_TAG="latest" | ||
;; | ||
*) | ||
IMAGE_TAG="$FEDORA_MAJOR_VERSION" | ||
;; | ||
esac | ||
|
||
{ | ||
echo "{" | ||
echo '"image-name": "'"$IMAGE_NAME"'",' | ||
echo '"image-flavor": "'"$IMAGE_FLAVOR"'",' | ||
echo '"image-vendor": "'"$IMAGE_VENDOR"'",' | ||
echo '"image-ref": "'"$IMAGE_REF"'",' | ||
echo '"image-tag":"'"$IMAGE_TAG"'",' | ||
echo '"base-image-name": "'"$BASE_IMAGE_NAME"'",' | ||
echo '"fedora-version": "'"$FEDORA_MAJOR_VERSION"'"' | ||
echo "}" | ||
} > "/usr/share/ublue-os/image-info.json" |