From 07cf37678bcaf3691991d1f15e7d35b9241e9225 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 11 Aug 2010 19:53:05 -0700 Subject: Add a giturl command This prints out the url that would be passed to koji to do the build. --- src/fedpkg.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index 2219a38..656464e 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -460,6 +460,14 @@ def gimmespec(args): log.error('Could not get spec file: %s' % e) sys.exit(1) +def giturl(args): + try: + mymodule = pyfedpkg.PackageModule(args.path) + print(mymodule.giturl()) + except pyfedpkg.FedpkgError, e: + log.error('Could not get the giturl: %s' % e) + sys.exit(1) + def import_srpm(args): # See if we need to create a module from scratch, and do so if args.create: @@ -871,6 +879,11 @@ packages will be built sequentially. help = 'print spec file name') parser_gimmespec.set_defaults(command = gimmespec) + # giturl + parser_giturl = subparsers.add_parser('giturl', + help = 'print the url for building') + parser_giturl.set_defaults(command = giturl) + # Import content into a module parser_import_srpm = subparsers.add_parser('import', help = 'Import content into a module') -- cgit