INNER CODE UNIT · Python
build_archives
zhinkgit/embeddedskills · .github/maintenance/package_release.py:105
def build_archives(root: Path, output_directory: Path, version: str) -> list[Path]:
root = root.resolve()
output_directory = output_directory.resolve()
version = validate_version(version)
if output_directory == root:
raise ValueError("release output directory must not be the repository root")
skill_directories: list[Path] = []
for path in root.iterdir():
resolved = path.resolve()
if is_output_path(path, root, output_directory):
continue
if (path.is_symlink() or not resolved.is_relative_to(root)) and (
path / "SKILL.md"
).is_file():
raise ValueError(
f"release skill directory must not escape through a link: {path.name}"
)