X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=scripts%2Fextra-version-git.sh;h=5c428080c3294f349741996d2c034c0d7ee445f2;hb=HEAD;hp=e5a3e176699d59d956d550318ff0bf97adfa27d6;hpb=6c27a5ccba05b088fbfcf8cd982c25649838298d;p=lttng-modules.git diff --git a/scripts/extra-version-git.sh b/scripts/extra-version-git.sh index e5a3e176..5c428080 100755 --- a/scripts/extra-version-git.sh +++ b/scripts/extra-version-git.sh @@ -1,5 +1,5 @@ #!/bin/sh -# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) +# SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only) # First argument is the path to the lttng modules sources. TOP_LTTNG_MODULES_DIR="$1" @@ -7,7 +7,7 @@ TOP_LTTNG_MODULES_DIR="$1" GIT_VERSION="0" if test -x "$(which git 2>&1;true)" && test -r "${TOP_LTTNG_MODULES_DIR}/.git"; then - GIT_VERSION_STR="$(cd "${TOP_LTTNG_MODULES_DIR}" && git describe --tags --dirty)" + GIT_VERSION_STR="$(cd "${TOP_LTTNG_MODULES_DIR}" && git describe --tags --dirty 2> /dev/null)" GIT_CURRENT_TAG="$(cd "${TOP_LTTNG_MODULES_DIR}" && git describe --tags --exact-match --match="v[0-9]*" HEAD 2> /dev/null)" GIT_VERSION="${GIT_VERSION_STR}"