]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Allow setting version-tag option via VERSION_TAG env variable
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 15 Jan 2021 19:51:42 +0000 (20:51 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 15 Jan 2021 20:42:30 +0000 (21:42 +0100)
With https://github.com/systemd/mkosi/pull/630, we can set environment
variables for the build script in mkosi. Let's modify the build script
so we can set the version-tag option via an environment variable of the
same name. The default is the empty string which causes meson to fall
back to the default behavior (git version).

mkosi.build

index b60a61f8fe60d2f8095402187e916ba230d56069..0fa0f0aa17d971802e02238e43c2c03e661fe8a9 100755 (executable)
@@ -92,7 +92,8 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then
                 -D man=false \
                 -D "nobody-user=$nobody_user" \
                 -D "nobody-group=$nobody_group" \
-                -D translations=false
+                -D translations=false \
+                -D version-tag="${VERSION_TAG}"
 fi
 
 cd "$BUILDDIR"