generate zip doesn't need to run openpype

This commit is contained in:
Ondrej Samohel 2021-05-03 12:48:14 +02:00 committed by Ondrej Samohel
parent 4fe35c671a
commit ee43e3af34
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
6 changed files with 87 additions and 64 deletions

View file

@ -224,17 +224,6 @@ def launch(app, project, asset, task,
PypeCommands().run_application(app, project, asset, task, tools, arguments)
@main.command()
@click.option("-p", "--path", help="Path to zip file", default=None)
def generate_zip(path):
"""Generate Pype zip from current sources.
If PATH is not provided, it will create zip file in user data dir.
"""
PypeCommands().generate_zip(path)
@main.command(
context_settings=dict(
ignore_unknown_options=True,

View file

@ -119,26 +119,3 @@ class PypeCommands:
def validate_jsons(self):
pass
@staticmethod
def generate_zip(out_path: str):
"""Generate zip file from current sources.
Args:
out_path (str): Path to generated zip file.
"""
from igniter import bootstrap_repos
# create zip file
bs = bootstrap_repos.BootstrapRepos()
if out_path:
out_path = Path(out_path)
bs.data_dir = out_path.parent
print(f">>> Creating zip in {bs.data_dir} ...")
repo_file = bs.create_version_from_live_code()
if not repo_file:
print("!!! Error while creating zip file.")
exit(1)
print(f">>> Created {repo_file}")