From: Felipe Contreras Date: Mon, 24 Apr 2023 16:50:36 GMT Subject: [PATCH v2 10/15] version-gen: refactor describe function Message-ID: <20230424165041.25180-11-felipe.contreras@gmail.com> In-Reply-To: <20230424165041.25180-1-felipe.contreras@gmail.com> No functional changes. Signed-off-by: Felipe Contreras --- GIT-VERSION-GEN | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index c5265cf9ad..0eaa813cca 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -4,7 +4,7 @@ GVF=GIT-VERSION-FILE DEF_VER=v2.40.GIT describe () { - VN=$(git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g') || return 1 + git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g' } # First see if there is a version file (included in release tarballs), @@ -14,7 +14,7 @@ then VN=$(cat version) elif test -d "${GIT_DIR:-.git}" -o -f .git then - describe + VN=$(describe) fi : "${VN:=$DEF_VER}" -- 2.40.0+fc1