Make vcs-tag do something useful for non-developer mode as well
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Jul 2024 11:05:11 +0000 (13:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Jul 2024 10:04:40 +0000 (12:04 +0200)
commit944faf65986f36d7ed3a4ba5cb4cc763011f0f77
tree22eed0f654453f5e433d4958c31c98909cffd0c1
parent733518b41350ce781c7e41a4c866eafb9e549e1f
Make vcs-tag do something useful for non-developer mode as well

When building packages of arbitrary commits of systemd-stable,
distributors might want to include a git sha of the exact commit
they're on. Let's extend vcs-tag a little to make this possible.

If we're on a commit matching a tag, don't generate a git sha at all.
If we're not on a commit matching a tag, generate a vcs tag as usually.
However, if we're not in developer mode, don't append a '^' if the tree
is dirty to accomodate package builds applying various patches to the
tree which shouldn't be considered as "dirty" edits.
meson.build
tools/vcs-tag.sh [new file with mode: 0755]