Permalink
Browse files

[fix] utils/upchangelog.sh: use tags

  • Loading branch information...
1 parent 59656dc commit 3aec54576d32e3decafb7dba4a378578757a1a2e @OpaOnWindowsNow OpaOnWindowsNow committed Mar 27, 2012
Showing with 9 additions and 6 deletions.
  1. +1 −1 utils/CHANGELOG.TAG
  2. +8 −5 utils/upchangelog.sh
View
@@ -1 +1 @@
-9a7e9a41dc88ecfcc579ae7b383a00455b65ec6d
+v1466
View
@@ -28,12 +28,10 @@ EOF
}
-MASTERTAG=$(git tag | grep -e "^v[0-9]*" | sort -n | tail -n 1)
-CHANGELOGTAG=$(cat $CHANGELOGTAGF)
normalise_tag(){
- local SHA=git log -n --format="%H" $1
- local TAG=git tag --contains $1
+ local SHA=$(git log -n 1 --format="%h" $1)
+ local TAG=$(git tag --contains $1 | head -n 1)
if [ "$TAG" = "" ];
then
echo $SHA
@@ -42,6 +40,11 @@ normalise_tag(){
fi
}
+CHANGELOGTAG=$(normalise_tag `cat $CHANGELOGTAGF`)
+MASTERTAG=$(git tag --contains $CHANGELOGTAG | tail -n 1)
+
+echo Target $CHANGELOGTAG to $MASTERTAG
+
while [ $# -gt 0 ]; do
case "$1" in
-low)
@@ -89,7 +92,7 @@ changelogcommit(){
}
-git log --pretty=format:%h --grep="^CHANGELOG" $CHANGELOGTAG..$MASTERTAG > $DIFFGIT
+git log --format="%h" --grep="^CHANGELOG" $CHANGELOGTAG..$MASTERTAG > $DIFFGIT
echo $(cat $DIFFGIT | wc -w) entries

0 comments on commit 3aec545

Please sign in to comment.