Skip to content

Commit

Permalink
support/meson/version: fix case where there is no tags
Browse files Browse the repository at this point in the history
This happens with personal fork(s).
  • Loading branch information
fvalette-ledger committed Sep 30, 2024
1 parent 5114efa commit 304b4be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions support/meson/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
# SPDX-FileCopyrightText: 2023 Ledger SAS
# SPDX-License-Identifier: Apache-2.0


if [ "$1" = "get-vcs" ]; then
git -C "$MESON_SOURCE_ROOT" describe --tags --dirty
GIT_OPTS="--tags --dirty"
TAGS=$(git tag)
if [ -z "$TAGS" ]; then
GIT_OPTS="--always"
fi

git -C "$MESON_SOURCE_ROOT" describe $GIT_OPTS
elif [ "$1" = "set-dist" ]; then
$MESONREWRITE --sourcedir="$MESON_PROJECT_DIST_ROOT" kwargs set project / version "$2"
else
Expand Down

0 comments on commit 304b4be

Please sign in to comment.