diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-08-11 19:53:05 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-08-11 22:09:06 -0700 |
commit | 07cf37678bcaf3691991d1f15e7d35b9241e9225 (patch) | |
tree | 7db78939d92ae9a4452f018332cfea5e3458b17c /src/pyfedpkg/__init__.py | |
parent | 512c8644c854c6be1f761154d88740c0e90546ca (diff) | |
download | fedora-packager-07cf37678bcaf3691991d1f15e7d35b9241e9225.tar.gz fedora-packager-07cf37678bcaf3691991d1f15e7d35b9241e9225.tar.xz fedora-packager-07cf37678bcaf3691991d1f15e7d35b9241e9225.zip |
Add a giturl command
This prints out the url that would be passed to koji to do the build.
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r-- | src/pyfedpkg/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 8ab50e4..0e78f53 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1112,6 +1112,14 @@ class PackageModule: return f raise FedpkgError('No spec file found.') + def giturl(self): + """Return the git url that would be used for building""" + + # Get the commit hash + commit = self.repo.iter_commits().next().sha + url = ANONGITURL % {'module': self.module} + '?#%s' % commit + return url + def koji_upload(self, file, path, callback=None): """Upload a file to koji |