summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-11 19:53:05 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-11 22:09:06 -0700
commit07cf37678bcaf3691991d1f15e7d35b9241e9225 (patch)
tree7db78939d92ae9a4452f018332cfea5e3458b17c /src/fedpkg.py
parent512c8644c854c6be1f761154d88740c0e90546ca (diff)
downloadfedora-packager-07cf37678bcaf3691991d1f15e7d35b9241e9225.zip
fedora-packager-07cf37678bcaf3691991d1f15e7d35b9241e9225.tar.gz
fedora-packager-07cf37678bcaf3691991d1f15e7d35b9241e9225.tar.xz
Add a giturl command
This prints out the url that would be passed to koji to do the build.
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py13
1 files changed, 13 insertions, 0 deletions
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')