File tree 1 file changed +17
-6
lines changed
1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 21
21
#
22
22
#
23
23
24
- tag=trunk
25
24
version=dev
26
- git=no
27
25
28
26
# Define in environment if necessary to get postgis to configure,
29
27
# which is only done to build comments.
@@ -34,14 +32,27 @@ if [ "$MAKE" = "" ]; then
34
32
MAKE=make
35
33
fi
36
34
37
- [ -d " .git" ] && git=yes
38
- [ " $git " = " yes" ] && tag=svn-$tag
35
+ if [ -d " .git" ]; then
36
+ git=yes
37
+ # Extract tag from git or default to trunk
38
+ tag=` git branch | grep \* | awk ' {print $2}' `
39
+ else
40
+ git=no
41
+ # Extract tag from svn or default to trunk
42
+ tag=` svn info 2> /dev/null | grep ^URL | sed ' s/.*\///' `
43
+ [ -z " $tag " ] && tag=trunk
44
+ [ " $tag " != " trunk" ] && tag=branches/$tag
45
+ fi
39
46
40
47
if [ -n " $1 " ]; then
41
48
if [ " $1 " = " -b" ]; then
42
49
shift
43
- tag=" branches/$1 "
44
- [ " $git " = " yes" ] && tag=svn-$1
50
+ if [ " $git " = " yes" ]; then
51
+ tag=svn-$1
52
+ else
53
+ tag=" $1 "
54
+ [ " $tag " != " trunk" ] && tag=" branches/$tag "
55
+ fi
45
56
branch=yes
46
57
else
47
58
version=" $1 "
You can’t perform that action at this time.
0 commit comments