feat(cicd): collect only expected artifact bundle files
Artifact collection previously grabbed every file under each bundle directory, which could include unrelated or intermediate outputs. This updates the logic to only include files with the expected extensions for each artifact type, improving accuracy and reducing noise. - Use a per-bundle suffix map to filter collected artifacts - Switch to non-recursive directory iteration for bundle roots
This commit is contained in:
+14
-9
@@ -115,16 +115,21 @@ def _ensure_bucket(client: Minio, bucket_name: str) -> None:
|
|||||||
|
|
||||||
def _collect_artifacts() -> List[Path]:
|
def _collect_artifacts() -> List[Path]:
|
||||||
artifacts: List[Path] = []
|
artifacts: List[Path] = []
|
||||||
for directory in (
|
bundle_dirs = {
|
||||||
ARTIFACT_ROOT / "msi",
|
ARTIFACT_ROOT / "msi": (".msi", ".sig"),
|
||||||
ARTIFACT_ROOT / "nsis",
|
ARTIFACT_ROOT / "nsis": (".exe", ".sig"),
|
||||||
ARTIFACT_ROOT / "appimage",
|
ARTIFACT_ROOT / "appimage": (".appimage", ".sig"),
|
||||||
ARTIFACT_ROOT / "deb",
|
ARTIFACT_ROOT / "deb": (".deb", ".sig"),
|
||||||
ARTIFACT_ROOT / "rpm",
|
ARTIFACT_ROOT / "rpm": (".rpm", ".sig"),
|
||||||
ARTIFACT_ROOT / "app",
|
ARTIFACT_ROOT / "app": (".dmg", ".zip", ".sig"),
|
||||||
):
|
}
|
||||||
|
for directory, suffixes in bundle_dirs.items():
|
||||||
if directory.exists():
|
if directory.exists():
|
||||||
artifacts.extend(p for p in directory.rglob("*") if p.is_file())
|
artifacts.extend(
|
||||||
|
p
|
||||||
|
for p in directory.iterdir()
|
||||||
|
if p.is_file() and p.suffix.lower() in suffixes
|
||||||
|
)
|
||||||
return artifacts
|
return artifacts
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user