Skip to content

Commit ab9bda7

Browse files
committed
Update the generation of the silverpeas docker library by indicating the git ref from which fetching the commits
1 parent c3a61f2 commit ab9bda7

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

generate-docker-library.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,30 @@ function printVersion() {
1111
1212
Tags: $1
1313
GitCommit: $2
14+
GitFetch: refs/heads/$3
1415
EOE
1516
}
1617

1718
isFirst=1
19+
currentBase=""
20+
count=0
1821
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 ))
1932
commit=`git rev-parse ${version}`
33+
fetch=`echo ${version} | grep -o "[0-9].[0-9]"`.x
2034
if [ $isFirst -eq 1 ]; then
2135
isFirst=0
22-
printVersion "${version}, latest" ${commit}
36+
printVersion "${version}, latest" ${commit} ${fetch}
2337
else
24-
printVersion "${version}" ${commit}
38+
printVersion "${version}" ${commit} ${fetch}
2539
fi
2640
done

0 commit comments

Comments
 (0)