[ofa-general] [PATCH] management/gen_chlog.sh: fixes and improvements

Sasha Khapyorsky sashak at voltaire.com
Tue Sep 18 18:29:28 PDT 2007


Parse tags properly and make ChangeLog output similar to existing one.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 gen_chlog.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gen_chlog.sh b/gen_chlog.sh
index 9d60081..c54028a 100755
--- a/gen_chlog.sh
+++ b/gen_chlog.sh
@@ -33,7 +33,7 @@ mkchlog()
 
 	prev_tag=""
 
-	for tag in `git-tag -l $target` ; do
+	for tag in `git-tag -l ${target}-'*'` ; do
 		obj=`git-cat-file tag $tag | awk '/^object /{print $2}'`
 		base=`git-merge-base $obj HEAD`
 		if [ -z "$base" -o "$base" != $obj ] ; then
@@ -51,7 +51,8 @@ mkchlog()
 
 	for ver in $all_vers ; do
 		ver_name=`echo $ver | sed -e 's/^.*\.\.//'`
-		echo "* Version: $ver_name"
+		echo ""
+		echo "** Version: $ver_name"
 		echo ""
 		git-log --no-merges "${format}" $ver -- $target
 		prev_t=$tag..
@@ -60,7 +61,8 @@ mkchlog()
 
 
 if [ -z "$spec_format" ] ; then
-	mkchlog $TARGET --pretty=format:"commit %H%n%ad %an%n%n    %s%n"
+	mkchlog $TARGET --pretty=format:"%ad %an%n%H%n%n* %s%n" \
+		| sed -e 's/^\* /\t* /'
 else
 	echo "%changelog"
 	mkchlog $TARGET --pretty=format:"- %ad %an: %s"
-- 
1.5.3.1.91.gd3392




More information about the general mailing list