diff options
-rw-r--r-- | src/fedpkg.bash | 2 | ||||
-rwxr-xr-x | src/fedpkg.py | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/fedpkg.bash b/src/fedpkg.bash index bb57b94..9ec0f02 100644 --- a/src/fedpkg.bash +++ b/src/fedpkg.bash @@ -108,7 +108,7 @@ _fedpkg() after="package" ;; commit|ci) - options="--push -p" + options="--push -p --clog -c" options_string="--message -m" options_file="--file -F" after="file" diff --git a/src/fedpkg.py b/src/fedpkg.py index 8fc21ad..405eb3f 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -440,6 +440,14 @@ def clone(args): sys.exit(1) def commit(args): + if args.clog: + try: + mymodule = pyfedpkg.PackageModule(args.path) + mymodule.clog() + except pyfedpkg.FedpkgError, e: + log.error('coult not create clog: %s' % e) + sys.exit(1) + args.file = os.path.abspath('clog') try: pyfedpkg.commit(args.path, args.message, args.file, args.files) except pyfedpkg.FedpkgError, e: @@ -909,6 +917,10 @@ packages will be built sequentially. # commit stuff parser_commit = subparsers.add_parser('commit', help = 'Commit changes') + parser_commit.add_argument('-c', '--clog', + default = False, + action = 'store_true', + help = 'Generate the commit message from the %Changelog section') parser_commit.add_argument('-m', '--message', default = None, help = 'Use the given <msg> as the commit message') |