Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
184f41a23b7b
Commit
6747e2be
authored
Jul 13, 2021
by
Fabien Amarger
Browse files
chore(debian): Remove debian package name format from new cube command
parent
97d1287fa822
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb/devtools/devctl.py
View file @
184f41a2
...
...
@@ -797,7 +797,6 @@ layout, and a full featured cube with "full" layout.',
def
run
(
self
,
args
):
import
re
from
logilab.common.shellutils
import
ASK
cubename
=
args
[
0
]
if
not
re
.
match
(
"[_A-Za-z][_A-Za-z0-9]*$"
,
cubename
):
...
...
@@ -812,20 +811,7 @@ layout, and a full featured cube with "full" layout.',
mkdir
(
destdir
)
except
OSError
as
err
:
self
.
fail
(
"failed to create directory %r
\n
(%s)"
%
(
destdir
,
err
))
default_name
=
"cubicweb-%s"
%
cubename
.
lower
().
replace
(
"_"
,
"-"
)
if
verbose
:
distname
=
input
(
"Debian name for your cube ? [%s]): "
%
default_name
).
strip
()
if
not
distname
:
distname
=
default_name
elif
not
distname
.
startswith
(
"cubicweb-"
):
if
ASK
.
confirm
(
"Do you mean cubicweb-%s ?"
%
distname
):
distname
=
"cubicweb-"
+
distname
else
:
distname
=
default_name
if
not
re
.
match
(
"[a-z][-a-z0-9]*$"
,
distname
):
raise
BadCommandUsage
(
"cube distname should be a valid debian package name"
)
distname
=
"cubicweb-%s"
%
cubename
.
lower
().
replace
(
"_"
,
"-"
)
cubedir
=
osp
.
join
(
destdir
,
distname
)
if
osp
.
exists
(
cubedir
):
self
.
fail
(
"%s already exists!"
%
cubedir
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment