mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-27 21:35:24 +00:00
a30a8f924a
We use image-info.sh to generate information about the given image at the time it's built. This replaces our current implementation of sourcing identifiers written to /etc/default/bazzite
27 lines
604 B
Bash
Executable File
27 lines
604 B
Bash
Executable File
#!/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"
|