X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fgeneratechangelog.sh;h=5fa902e19b2acdf0456850506d7df18ba9c3711a;hb=refs%2Fchanges%2F95%2F6695%2F1;hp=33a53022e2bbe0d117b465dc178634cd645ab07d;hpb=f94dd8ac7841b04e51bb50924b9ef369a6752b5e;p=osm%2Fdevops.git
diff --git a/tools/generatechangelog.sh b/tools/generatechangelog.sh
index 33a53022..5fa902e1 100755
--- a/tools/generatechangelog.sh
+++ b/tools/generatechangelog.sh
@@ -23,21 +23,24 @@ if [ -z "$list" ]; then
exit 1
fi
+TEMPDIR=$(mktemp -d)
+
echo "
OSM Changelog
" >> $OUTFILE
for i in $list; do
+ REPODIR=$TEMPDIR/$i
echo
echo $i
- if [ ! -d $i ]; then
- git clone https://osm.etsi.org/gerrit/osm/$i
+ if [ ! -d $REPODIR ]; then
+ git clone https://osm.etsi.org/gerrit/osm/$i $REPODIR
fi
- git -C $i checkout master
- git -C $i pull --rebase
- git -C $i fetch --tags
- TAG_START=$(git -C $i tag | sort -Vr | head -2 | sort -V | head -1)
- TAG_END=$(git -C $i tag | sort -Vr | head -1)
+ git -C $REPODIR checkout master
+ git -C $REPODIR pull --rebase
+ git -C $REPODIR fetch --tags
+ TAG_START=$(git -C $REPODIR tag | sort -Vr | head -2 | sort -V | head -1)
+ TAG_END=$(git -C $REPODIR tag | sort -Vr | head -1)
echo "Changes for $i tag: ${TAG_START}..${TAG_END}
" >> $OUTFILE
#git -C $i log --pretty=format:"* %h; author: %cn; date: %ci; subject:%s" ${TAG_START}..${TAG_END} >> $OUTFILE
- git -C $i log --pretty=format:" %h • %s " --reverse ${TAG_START}..${TAG_END} >> $OUTFILE
+ git -C $REPODIR log --pretty=format:" %h • %s " --reverse ${TAG_START}..${TAG_END} >> $OUTFILE
echo "" >> $OUTFILE
done