adding branding to the image
@@ -4,13 +4,14 @@ set -Eeuo pipefail
thisDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
source "$thisDir/.constants.sh" \
--flags 'no-build,debug,suite:,timestamp:' \
- --flags 'eol,ports,arch:,qemu,features:' \
+ --flags 'eol,ports,arch:,qemu,features:,buildid:' \
--flags 'suffix:,prefix:' \
--
export PATH="${thisDir}:${PATH}"
export REPO_ROOT="$(readlink -f "${thisDir}/..")"
+buildid="local"
eval "$dgetopt"
while true; do
flag="$1"; shift
@@ -26,6 +27,7 @@ while true; do
--timestamp) timestamp="$1"; shift ;; # timestamp is a parameter this time
--suffix) suffix="$1"; shift ;; # target name prefix
--prefix) prefix="$1"; shift ;; # target name suffix
+ --buildid) buildid="$1"; shift ;; # build commit hash
--) break ;;
*) eusage "unknown flag '$flag'" ;;
esac
@@ -165,6 +167,16 @@ codename="$(awk -F ": " "\$1 == \"Codename\" { print \$2; exit }" "$outputDir/Re
[ -z "${eol:-}" ] || sourcesListArgs+=( --eol )
[ -z "${ports:-}" ] || sourcesListArgs+=( --ports )
+ #Brand it
+ sed -i "s/^PRETTY_NAME=.*$/PRETTY_NAME=\"Garden Linux\"/g" rootfs/etc/os-release
+ sed -i "s/^HOME_URL=.*$/HOME_URL=\"https:\/\/gardenlinux.io\/\"/g" rootfs/etc/os-release
+ sed -i "s/^SUPPORT_URL=.*$/SUPPORT_URL=\"https:\/\/github.com\/gardenlinux\/gardenlinux\"/g" rootfs/etc/os-release
+ sed -i "s/^BUG_REPORT_URL=.*$/BUG_REPORT_URL=\"https:\/\/github.com\/gardenlinux\/gardenlinux\/issues\"/g" rootfs/etc/os-release
+ echo "GARDENLINUX_FEATURES=base,$features" >> rootfs/etc/os-release
+ echo "GARDENLINUX_VERSION_ID=$timestamp" >> rootfs/etc/os-release
+ echo "GARDENLINUX_BUILD_ID=$buildid" >> rootfs/etc/os-release
+ echo "VERSION_CODENAME=$suite" >> rootfs/etc/os-release
+
create_artifacts() {
local targetBase="$1"; shift
local rootfs="$1"; shift
