diff --git a/NEWS b/NEWS index 684921dd..e7d9ddc2 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ - osc service runall: runs all service local, independend of the mode This allows to create local files even when disabled or just created at buildtime + - support snapcraft.yaml build descriptions + - "osc add" of a directory offers to create an archive for uploading it 0.154 - switch to new obs_scm service when adding git URL's diff --git a/osc/commandline.py b/osc/commandline.py index a52530f1..1ae73ba0 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4436,8 +4436,17 @@ Please submit there instead, or use --nodevelproject to force direct submission. addGitSource(arg) else: addDownloadUrlService(arg) - else: - addFiles([arg]) + continue + if os.path.isdir(arg): + resp = raw_input("%s is a directory, do you want to archive it for submission? (y/n)" % (arg)) + if resp not in ('y', 'Y'): + continue + archive = ("%s.obscpio" % arg) + run_external("find %s | cpio -o -H newc > %s" % (arg, archive), shell=True) + addFiles([archive]) + continue + + addFiles([arg]) def do_mkpac(self, subcmd, opts, *args):