Commit d2f463f9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmlog: add -o option (just print git log)

parent f06cd1ea
...@@ -23,6 +23,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then ...@@ -23,6 +23,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo echo
echog "Ext. options:" echog "Ext. options:"
echog " -t test run (without change files and repo)" echog " -t test run (without change files and repo)"
echog " -o print git log since last release tag or TAG"
echog " -q quiet mode (do not ask anything)" echog " -q quiet mode (do not ask anything)"
echog " -n VERSION set version and reset release" echog " -n VERSION set version and reset release"
echo echo
...@@ -79,6 +80,12 @@ if [ "$1" = "-t" ] ; then ...@@ -79,6 +80,12 @@ if [ "$1" = "-t" ] ; then
shift shift
fi fi
GITLOG=
if [ "$1" = "-o" ] ; then
GITLOG=$1
shift
fi
LASTVERCMD= LASTVERCMD=
if [ "$1" = "--last-version" ] ; then if [ "$1" = "--last-version" ] ; then
LASTVERCMD=1 LASTVERCMD=1
...@@ -125,7 +132,7 @@ if [ -n "$LASTCHANGELOGCMD" ] ; then ...@@ -125,7 +132,7 @@ if [ -n "$LASTCHANGELOGCMD" ] ; then
exit $? exit $?
fi fi
[ -n "$CHANGELOGADD$CHANGELOGUPDATE$TESTRUN" ] || fatal "Run with -t param for test or with -h for help" [ -n "$CHANGELOGADD$CHANGELOGUPDATE$TESTRUN$GITLOG" ] || fatal "Run with -t param for test or with -h for help"
if [ -z "$FROMTAG" ] ; then if [ -z "$FROMTAG" ] ; then
build_rpms_name $SPECNAME build_rpms_name $SPECNAME
...@@ -140,6 +147,11 @@ if [ -z "$CHANGELOGADD" ] && is_last_commit_tag ; then ...@@ -140,6 +147,11 @@ if [ -z "$CHANGELOGADD" ] && is_last_commit_tag ; then
exit 0 exit 0
fi fi
if [ -n "$GITLOG" ] ; then
git log $FROMTAG..$TOTAG --reverse --no-merges --pretty="%H %s"
exit
fi
if [ -n "$CHANGELOGADD" ] ; then if [ -n "$CHANGELOGADD" ] ; then
CHANGELOG="- $TEXTMESSAGE" CHANGELOG="- $TEXTMESSAGE"
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment