buildscript: Include build variant in firmware version label

With this change, based on a tag "20190101" two firmwares
node-20190101
layer3-20190101
can be created based on build variant.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
Adrian Schmutzler 2019-02-03 17:58:00 +01:00
parent e6c469ec3c
commit 862f3cdf41
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ prebuild() {
if [ 0 -ne $? ]; then
version=$(git log -1 --pretty=format:%h)
fi
if [ -n "$(cat selected_variant)" ]; then
version="$(cat selected_variant)-$version"
fi
{
echo "FIRMWARE_VERSION=\"$version\""