mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
modified create ayon addons to add public files too
This commit is contained in:
parent
34d9945543
commit
62239bd8e6
1 changed files with 7 additions and 0 deletions
|
|
@ -105,6 +105,8 @@ def find_files_in_subdir(
|
|||
List[Tuple[str, str]]: List of tuples with path to file and parent
|
||||
directories relative to 'src_path'.
|
||||
"""
|
||||
if not os.path.exists(src_path):
|
||||
return []
|
||||
|
||||
if ignore_file_patterns is None:
|
||||
ignore_file_patterns = IGNORE_FILE_PATTERNS
|
||||
|
|
@ -210,6 +212,7 @@ def _get_server_mapping(
|
|||
addon_dir: Path, addon_version: str
|
||||
) -> List[Tuple[str, str]]:
|
||||
server_dir = addon_dir / "server"
|
||||
public_dir = addon_dir / "public"
|
||||
src_package_py = addon_dir / "package.py"
|
||||
pyproject_toml = addon_dir / "client" / "pyproject.toml"
|
||||
|
||||
|
|
@ -217,6 +220,10 @@ def _get_server_mapping(
|
|||
(src_path, f"server/{sub_path}")
|
||||
for src_path, sub_path in find_files_in_subdir(str(server_dir))
|
||||
]
|
||||
mapping.extend([
|
||||
(src_path, f"public/{sub_path}")
|
||||
for src_path, sub_path in find_files_in_subdir(str(public_dir))
|
||||
])
|
||||
mapping.append((src_package_py.as_posix(), "package.py"))
|
||||
if pyproject_toml.exists():
|
||||
mapping.append((pyproject_toml.as_posix(), "private/pyproject.toml"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue