File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,30 @@ function printVersion() {
11
11
12
12
Tags: $1
13
13
GitCommit: $2
14
+ GitFetch: refs/heads/$3
14
15
EOE
15
16
}
16
17
17
18
isFirst=1
19
+ currentBase=" "
20
+ count=0
18
21
for version in ` git tag | tac | grep " ^[0-9.]\+$" ` ; do
22
+ base=` echo $version | grep -o " [0-9].[0-9]" `
23
+ if [ " $base " != " $currentBase " ]; then
24
+ currentBase=" $base "
25
+ else
26
+ continue
27
+ fi
28
+
29
+ test $count -eq 2 && break
30
+
31
+ count=$(( count + 1 ))
19
32
commit=` git rev-parse ${version} `
33
+ fetch=` echo ${version} | grep -o " [0-9].[0-9]" ` .x
20
34
if [ $isFirst -eq 1 ]; then
21
35
isFirst=0
22
- printVersion " ${version} , latest" ${commit}
36
+ printVersion " ${version} , latest" ${commit} ${fetch}
23
37
else
24
- printVersion " ${version} " ${commit}
38
+ printVersion " ${version} " ${commit} ${fetch}
25
39
fi
26
40
done
You can’t perform that action at this time.
0 commit comments