1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-02 09:46:16 +01:00

explicit "osc add" of a directory offers to create an archive for uploading it

Question: what can be a trigger to update it?
          checking for mtimes in directories where an .obscpio exists?
This commit is contained in:
Adrian Schröter 2016-06-30 08:19:23 +02:00
parent d623cb8552
commit b6f7d1be6c
2 changed files with 13 additions and 2 deletions

2
NEWS
View File

@ -2,6 +2,8 @@
- osc service runall: runs all service local, independend of the mode - osc service runall: runs all service local, independend of the mode
This allows to create local files even when disabled or This allows to create local files even when disabled or
just created at buildtime just created at buildtime
- support snapcraft.yaml build descriptions
- "osc add" of a directory offers to create an archive for uploading it
0.154 0.154
- switch to new obs_scm service when adding git URL's - switch to new obs_scm service when adding git URL's

View File

@ -4436,8 +4436,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
addGitSource(arg) addGitSource(arg)
else: else:
addDownloadUrlService(arg) addDownloadUrlService(arg)
else: continue
addFiles([arg]) 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): def do_mkpac(self, subcmd, opts, *args):