Message ID | 20230424165041.25180-13-felipe.contreras@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,01/15] version-gen: reorganize | expand |
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 40502363dd..6bf932c281 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -4,7 +4,7 @@ GVF=GIT-VERSION-FILE DEF_VER=2.40.GIT describe () { - git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g' + git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g' -e 's/^v//' } # First see if there is a version file (included in release tarballs), @@ -15,7 +15,6 @@ then elif test -d "${GIT_DIR:-.git}" -o -f .git then VN=$(describe) - VN=${VN#v} fi : "${VN:=$DEF_VER}"
We are already using sed, might as well take advantage of it. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- GIT-VERSION-GEN | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)