Skip to content

Commit d21a7ae

Browse files
committed
gvfs: ensure that the version is based on a GVFS tag
Since we really want to be based on a `.vfs.*` tag, let's make sure that there was a new-enough one, i.e. one that agrees with the first three version numbers of the recorded default version. This prevents e.g. v2.22.0.vfs.0.<some-huge-number>.<commit> from being used when the current release train was not yet tagged. It is important to get the first three numbers of the version right because e.g. Scalar makes decisions depending on those (such as assuming that the `git maintenance` built-in is not available, even though it actually _is_ available). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 07c54e4 commit d21a7ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

GIT-VERSION-GEN

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,15 @@ then
5050
test -d "${GIT_DIR:-.git}" ||
5151
test -f "$SOURCE_DIR"/.git;
5252
} &&
53-
VN=$(git -C "$SOURCE_DIR" describe --dirty --match="v[0-9]*" 2>/dev/null) &&
53+
VN=$(git -C "$SOURCE_DIR" describe --dirty --match="v[0-9]*vfs*" 2>/dev/null) &&
5454
case "$VN" in
5555
*$LF*) (exit 1) ;;
56+
v[0-9]*)
57+
if test "${VN%%.vfs.*}" != "${DEF_VER%%.vfs.*}"
58+
then
59+
echo "Found version $VN, which is not based on $DEF_VER" >&2
60+
exit 1
61+
fi ;;
5662
esac
5763
then
5864
VN=$(echo "$VN" | sed -e 's/-/./g');

0 commit comments

Comments
 (0)