mirror of
https://github.com/git/git
synced 2024-11-05 01:58:18 +00:00
d19b6cd2dd
Some checks failed
CI / config (push) Has been cancelled
git-l10n / git-po-helper (push) Has been cancelled
Coverity / coverity (push) Has been cancelled
CI / win+VS test (2) (push) Has been cancelled
CI / win+VS test (1) (push) Has been cancelled
CI / win+VS test (0) (push) Has been cancelled
CI / documentation (push) Has been cancelled
CI / sparse (push) Has been cancelled
CI / static-analysis (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.image}}) (map[distro:ubuntu32-16.04 image:daald/ubuntu32:xenial jobname:linux32]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.image}}) (map[distro:fedora-latest image:fedora jobname:pedantic]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.image}}) (map[distro:alpine-latest image:alpine jobname:linux-musl]) (push) Has been cancelled
CI / fuzz smoke test (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:gcc-13 jobname:osx-gcc pool:macos-13]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:gcc jobname:linux-reftable-leaks pool:ubuntu-latest]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:gcc jobname:linux-leaks pool:ubuntu-latest]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:gcc jobname:linux-gcc-default pool:ubuntu-latest]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:gcc cc_package:gcc-8 jobname:linux-gcc pool:ubuntu-20.04]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:gcc cc_package:gcc-8 jobname:linux-TEST-vars pool:ubuntu-20.04]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:clang jobname:osx-reftable pool:macos-13]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:clang jobname:osx-clang pool:macos-13]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:clang jobname:linux-sha256 pool:ubuntu-latest]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:clang jobname:linux-reftable pool:ubuntu-latest]) (push) Has been cancelled
CI / ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) (map[cc:clang jobname:linux-asan-ubsan pool:ubuntu-latest]) (push) Has been cancelled
CI / win+VS test (9) (push) Has been cancelled
CI / win+VS test (8) (push) Has been cancelled
CI / win+VS test (7) (push) Has been cancelled
CI / win+VS test (6) (push) Has been cancelled
CI / win+VS test (5) (push) Has been cancelled
CI / win+VS test (4) (push) Has been cancelled
CI / win+VS test (3) (push) Has been cancelled
CI / win+VS build (push) Has been cancelled
CI / win test (9) (push) Has been cancelled
CI / win test (8) (push) Has been cancelled
CI / win test (7) (push) Has been cancelled
CI / win test (6) (push) Has been cancelled
CI / win test (5) (push) Has been cancelled
CI / win test (4) (push) Has been cancelled
CI / win test (3) (push) Has been cancelled
CI / win test (2) (push) Has been cancelled
CI / win test (1) (push) Has been cancelled
CI / win test (0) (push) Has been cancelled
CI / win build (push) Has been cancelled
Signed-off-by: Junio C Hamano <gitster@pobox.com>
40 lines
768 B
Bash
Executable file
40 lines
768 B
Bash
Executable file
#!/bin/sh
|
|
|
|
GVF=GIT-VERSION-FILE
|
|
DEF_VER=v2.46.0-rc1
|
|
|
|
LF='
|
|
'
|
|
|
|
# First see if there is a version file (included in release tarballs),
|
|
# then try git-describe, then default.
|
|
if test -f version
|
|
then
|
|
VN=$(cat version) || VN="$DEF_VER"
|
|
elif { test -d "${GIT_DIR:-.git}" || test -f .git; } &&
|
|
VN=$(git describe --match "v[0-9]*" HEAD 2>/dev/null) &&
|
|
case "$VN" in
|
|
*$LF*) (exit 1) ;;
|
|
v[0-9]*)
|
|
git update-index -q --refresh
|
|
test -z "$(git diff-index --name-only HEAD --)" ||
|
|
VN="$VN-dirty" ;;
|
|
esac
|
|
then
|
|
VN=$(echo "$VN" | sed -e 's/-/./g');
|
|
else
|
|
VN="$DEF_VER"
|
|
fi
|
|
|
|
VN=$(expr "$VN" : v*'\(.*\)')
|
|
|
|
if test -r $GVF
|
|
then
|
|
VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
|
|
else
|
|
VC=unset
|
|
fi
|
|
test "$VN" = "$VC" || {
|
|
echo >&2 "GIT_VERSION = $VN"
|
|
echo "GIT_VERSION = $VN" >$GVF
|
|
}
|