mirror of
https://abf.rosa.ru/djam/abf-console-client-src.git
synced 2025-02-23 18:02:50 +00:00
Add option to save all artefacts to rpmbuild command
This commit is contained in:
parent
c0bd31231f
commit
84aef65ffd
1 changed files with 19 additions and 15 deletions
4
abf.py
4
abf.py
|
@ -306,6 +306,7 @@ def parse_command_line():
|
|||
subparser = subparsers.add_parser('rpmbuild', help=_('Build a project locally using rpmbuild.'), epilog=_('No checkouts will be made,'
|
||||
'the current git repository state will be used'))
|
||||
subparser.add_argument('-b', '--build', action='store', choices=['b', 's', 'a'], default='a', help=_('Build src.rpm (s), rpm (b) or both (a)'))
|
||||
subparser.add_argument('-s', '--save-rpmbuild-folder', action='store_true', help=_('Copy the whole rpmbuild folder into the current folder after the build'))
|
||||
subparser.set_defaults(func=localbuild_rpmbuild)
|
||||
|
||||
# publish
|
||||
|
@ -634,6 +635,9 @@ def localbuild_rpmbuild():
|
|||
log.error(_("Can not execute rpmbuild (%s). Maybe it is not installed?") % str(ex))
|
||||
exit(1)
|
||||
log.info(_('Moving files to current directory...'))
|
||||
if command_line.save_rpmbuild_folder:
|
||||
shutil.copytree(src_dir, src + "/rpmbuild", symlinks=True)
|
||||
else:
|
||||
items = [x for x in os.walk(src_dir+'/SRPMS')] + [x for x in os.walk(src_dir+'/RPMS')]
|
||||
for item in items:
|
||||
path, dirs, files = item
|
||||
|
|
Loading…
Add table
Reference in a new issue