diff options
Diffstat (limited to 'src/pyfedpkg')
-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 |