diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-07-26 13:34:56 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-07-26 13:34:56 -0700 |
commit | 752b39b5b5803ef9b27e366c82ced9b7669d461c (patch) | |
tree | 8883706b756e5f2cf14ce4ac6a75f71c90e3d199 /src/fedpkg.py | |
parent | 26b2ed80839c521a6b79fafda008220918ac05b5 (diff) | |
download | fedora-packager-752b39b5b5803ef9b27e366c82ced9b7669d461c.tar.gz fedora-packager-752b39b5b5803ef9b27e366c82ced9b7669d461c.tar.xz fedora-packager-752b39b5b5803ef9b27e366c82ced9b7669d461c.zip |
Impliment pushing. Thanks Jochen@herr-schmitt.de
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-x | src/fedpkg.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py index f9db3c1..ba36f26 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -419,8 +419,7 @@ def commit(args): log.error('Could not commit: %s' % e) sys.exit(1) if args.push: - # do the push command here. - pass + push(args) def compile(args): arch = None @@ -559,6 +558,14 @@ def prep(args): log.error('Could not prep: %s' % e) sys.exit(1) +def push(args): + try: + mymodule = pyfedpkg.PackageModule(args.path) + mymodule.push() + except pyfedpkg.FedpkgError, e: + log.error('Could not push: %s' % e) + sys.exit(1) + def scratchbuild(args): # A scratch build is just a build with --scratch args.scratch = True @@ -855,6 +862,11 @@ packages will be built sequentially. parser_prep.add_argument('--arch', help = 'Prep for a specific arch') parser_prep.set_defaults(command = prep) + # Push stuff + parser_push = subparsers.add_parser('push', + help = 'Push changes to remote repository') + parser_push.set_defaults(command = push) + # scratch build parser_scratchbuild = subparsers.add_parser('scratch-build', help = 'Request scratch build', |