Commit 4e56c0ed authored by Jérémy Bobbio (Lunar)'s avatar Jérémy Bobbio (Lunar)
Browse files

[devtools] Allow to specify short desc on `newcube` command line

In order to implement automated testing of `cubicweb-ctl newcube`, we
need to avoid any user interaction. So we add a `-s` switch to specify
a short description on the command-line instead of requiring an input.
parent fdd7165fe1f3
......@@ -612,6 +612,11 @@ layout, and a full featured cube with "full" layout.',
'help': 'verbose mode: will ask all possible configuration questions',
{'short': 's', 'type': 'string', 'metavar': '<short description>',
'help': 'short description for the cube',
{'short': 'a', 'type' : 'string', 'metavar': '<author>',
'default': 'LOGILAB S.A. (Paris, FRANCE)',
......@@ -707,7 +712,7 @@ layout, and a full featured cube with "full" layout.',
if osp.exists(cubedir):"%s already exists!" % cubedir)
skeldir = osp.join(BASEDIR, 'skeleton')
longdesc = shortdesc = input(
longdesc = shortdesc = self['short-description'] or input(
'Enter a short description for your cube: ')
if verbose:
longdesc = input(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment