From c49ad913b740149b0e8d1f50e766e3037694137c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 23 Nov 2023 13:55:22 +0100 Subject: [PATCH] Use maintainer instead of name in defaults due to it's duplicate with name from workflows file. --- container/bin/build_source | 12 ++++++------ container/build-defaults.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/container/bin/build_source b/container/bin/build_source index eccdd1c..caec218 100755 --- a/container/bin/build_source +++ b/container/bin/build_source @@ -111,16 +111,16 @@ apply_patches() ( version="$(yq -r '.version // ""' < "$1/pkg.yaml")" [ -n "$version" ] || version="$(dpkg-parsechangelog --show-field Version)" email="$(yq -r '.email // ""' < "$defaults_file")" - email="$(yq -r '.email // "'"$email"'"' < "$inputs_file")" - name="$(yq -r '.name // ""' < "$defaults_file")" - name="$(yq -r '.name // "'"$name"'"' < "$inputs_file")" + email="$(yq -r --arg name "$name" '.jobs[$name].with.email // "'"$email"'"' < "$inputs_file")" + maintainer="$(yq -r '.maintainer // ""' < "$defaults_file")" + maintainer="$(yq -r --arg name "$name" '.jobs[$name].with.maintainer // "'"$maintainer"'"' < "$inputs_file")" distribution="$(yq -r '.distribution // ""' < "$defaults_file")" - distribution="$(yq -r '.distribution // "'"$distribution"'"' < "$inputs_file")" + distribution="$(yq -r --arg name "$name" '.jobs[$name].with.distribution // "'"$distribution"'"' < "$inputs_file")" version_suffix="$(yq -r '.version_suffix // ""' < "$1/pkg.yaml")" message="$(yq -r '.message // ""' < "$defaults_file")" - message="$(yq -r '.message // "'"$message"'"' < "$inputs_file")" + message="$(yq -r --arg name "$name" '.jobs[$name].with.message // "'"$message"'"' < "$inputs_file")" - DEBEMAIL="$email" DEBFULLNAME="$name" dch --newversion "$version$version_suffix" --distribution "$distribution" --force-distribution -- "$message" + DEBEMAIL="$email" DEBFULLNAME="$maintainer" dch --newversion "$version$version_suffix" --distribution "$distribution" --force-distribution -- "$message" if [ -x "$1/exec.post" ]; then SOURCE="$source" "$1/exec.post" diff --git a/container/build-defaults.yml b/container/build-defaults.yml index 29f8e32..da89577 100644 --- a/container/build-defaults.yml +++ b/container/build-defaults.yml @@ -1,4 +1,4 @@ email: "contact@gardenlinux.io" -name: "Garden Linux Builder" +maintainer: "Garden Linux Builder" distribution: gardenlinux message: "Rebuild for Garden Linux."