Skip to content

Commit 15ef670

Browse files
author
Junio C Hamano
committed
Meta/V & Meta/Doit: adjust to exact release
"git version" would not have g suffix for an exact release.
1 parent 3b798f2 commit 15ef670

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

Doit

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/sh
22

33
: ${J=-j2}
4-
while case "$1" in -pedantic) M=$1 ;; *) break ;; esac
4+
force=
5+
while case "$1" in
6+
-pedantic) M=$1 ;;
7+
-force) force=$1 ;;
8+
*) break ;;
9+
esac
510
do
611
shift
712
done
@@ -17,18 +22,23 @@ Meta/Make clean >/dev/null 2>&1
1722
nstall=install
1823
for branch in $branches
1924
do
25+
echo >&3 "** $branch **"
26+
2027
revision=$(git show-ref -s --verify "refs/heads/$branch") || {
2128
echo "** No $branch"
2229
continue
2330
}
2431

25-
if installed=$($HOME/git-$branch/bin/git version) &&
26-
version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$') &&
27-
version=$(git rev-parse --verify "$version") &&
32+
if installed=$($HOME/git-$v/bin/git version) &&
33+
{
34+
version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$') ||
35+
version=v$(expr "$installed" : 'git version \(.*\)')
36+
} &&
37+
version=$(git rev-parse --verify "$version^0") &&
2838
test "z$version" = "z$revision"
2939
then
3040
echo "* up-to-date version \"$installed\" is already installed from $branch"
31-
continue
41+
test -n "$force" || continue
3242
fi
3343

3444
echo "** $branch" &&
@@ -38,7 +48,7 @@ do
3848
Meta/Make $M -- test &&
3949
Meta/Make clean || exit $?
4050

41-
done >./:all.log 2>&1
51+
done >./:all.log 3>&2 2>&1
4252

4353
git checkout master
4454

V

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
for v in maint master next pu
44
do
55
installed=$($HOME/git-$v/bin/git version)
6-
version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$')
7-
version=$(git rev-parse --verify "$version")
6+
version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$') ||
7+
version=v$(expr "$installed" : 'git version \(.*\)')
8+
9+
version=$(git rev-parse --verify "$version^0")
810
revision=$(git show-ref -s --verify "refs/heads/$v")
911
if test "z$version" = "z$revision"
1012
then

0 commit comments

Comments
 (0)