From 84a937b798323b06a61acc5799053e5e09ba04db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Tue, 19 Nov 2019 21:19:37 +0100 Subject: [PATCH] buildscript: add variant information to firmware_release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also introduces a variant variable in our buildscript, as it is necessery multiple times in the build process. Signed-off-by: Fabian Bläse Reviewed-by: Christian Dresel --- buildscript | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildscript b/buildscript index 00f1874a..0920b74b 100755 --- a/buildscript +++ b/buildscript @@ -200,16 +200,18 @@ prebuild() { done < <(find "${builddir}/files" -name '*.tpl' -print0) #insert actual firware version informations into release file + variant=$(cat selected_variant) version=$(git describe --tags --dirty) if [ 0 -ne $? ]; then version=$(git log -1 --pretty=format:%h) fi - if [ -n "$(cat selected_variant)" ]; then - version="$(cat selected_variant)-$version" + if [ -n "$variant" ]; then + version="$variant-$version" fi { echo "FIRMWARE_VERSION=\"$version\"" + echo "VARIANT=\"$variant\"" echo "BUILD_DATE=\"build date: $(date)\"" echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\"" echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\""