mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
create cli commands for project backpack functions
This commit is contained in:
parent
c6b109bcdb
commit
7d19db96c4
2 changed files with 30 additions and 0 deletions
|
|
@ -412,3 +412,23 @@ def repack_version(directory):
|
|||
directory name.
|
||||
"""
|
||||
PypeCommands().repack_version(directory)
|
||||
|
||||
|
||||
@main.command()
|
||||
@click.option("--project", help="Project name")
|
||||
@click.option(
|
||||
"--dirpath", help="Directory where package is stored", default=None
|
||||
)
|
||||
def pack_project(project_name, dirpath):
|
||||
"""Create a package of project with all files and database dump."""
|
||||
PypeCommands().pack_project(project_name, dirpath)
|
||||
|
||||
|
||||
@main.command()
|
||||
@click.option("--zipfile", help="Path to zip file")
|
||||
@click.option(
|
||||
"--root", help="Replace root which was stored in project", default=None
|
||||
)
|
||||
def uppack_project(zipfile, root):
|
||||
"""Create a package of project with all files and database dump."""
|
||||
PypeCommands().unpack_project(zipfile, root)
|
||||
|
|
|
|||
|
|
@ -433,3 +433,13 @@ class PypeCommands:
|
|||
|
||||
version_packer = VersionRepacker(directory)
|
||||
version_packer.process()
|
||||
|
||||
def pack_project(project_name, dirpath):
|
||||
from openpype.lib.project_backpack import pack_project
|
||||
|
||||
pack_project(project_name, dirpath)
|
||||
|
||||
def unpack_project(zip_filepath, new_root):
|
||||
from openpype.lib.project_backpack import unpack_project
|
||||
|
||||
unpack_project(zip_filepath, new_root)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue