Commit e26019e0 authored by Noé Gaumont's avatar Noé Gaumont 🐙
Browse files

feat: add only-cube option to only create the cube

parent adde8e53979b
......@@ -231,6 +231,11 @@
action="store_true",
help="Print the YAMS schema only",
)
parser.add_argument(
"--only-cube",
action="store_true",
help="Only create the cube and exit (no instance and db-init)",
)
args = parser.parse_args()
......@@ -264,6 +269,11 @@
with open(f"{cube_master_folder}/{cube_subfolder}/schema.py", "a") as f:
f.write(serialize_to_python(schema))
if args.only_cube:
print("Cube correctly initialized")
exit(0)
# should pip install the cube
pip_install_cube = f"pip install -e cubicweb-{cube_name}"
run_and_print_if_error(pip_install_cube)
......
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