You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2025/03/21 14:13:51 UTC
(tooling-trusted-release) branch main updated: Use more consistent naming for artifacts
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 1624644 Use more consistent naming for artifacts
1624644 is described below
commit 16246446cc6d2c284b34e36ca42c4d82bc446b99
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Fri Mar 21 16:13:40 2025 +0200
Use more consistent naming for artifacts
---
atr/analysis.py | 10 ++++++----
atr/routes/files.py | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/atr/analysis.py b/atr/analysis.py
index 082585e..a5ae1a6 100755
--- a/atr/analysis.py
+++ b/atr/analysis.py
@@ -25,7 +25,7 @@ import signal
import sys
from typing import Final
-ARCHIVE_SUFFIXES: Final[list[str]] = [
+ARTIFACT_SUFFIXES: Final[list[str]] = [
"bin",
"crate",
"deb",
@@ -226,11 +226,13 @@ def extension_pattern() -> str:
# https://learn.microsoft.com/en-us/visualstudio/extensibility/anatomy-of-a-vsix-package?view=vs-2022
# What's the status of "pom"?
# We've included "sh", so perhaps we should include "patch"
- archive_pattern = r"(?P<archive>" + "|".join(["[.]" + re.escape(a) for a in ARCHIVE_SUFFIXES]) + r")"
+ metadata_artifact_pattern = (
+ r"(?P<metadata_artifact>" + "|".join(["[.]" + re.escape(a) for a in ARTIFACT_SUFFIXES]) + r")"
+ )
metadata_pattern = r"(?P<metadata>" + "|".join(["[.]" + re.escape(m) for m in METADATA_SUFFIXES]) + r")"
- archiveonly_pattern = r"(?P<archiveonly>" + "|".join(["[.]" + re.escape(a) for a in ARCHIVE_SUFFIXES]) + r")"
+ artifact_pattern = r"(?P<artifact>" + "|".join(["[.]" + re.escape(a) for a in ARTIFACT_SUFFIXES]) + r")"
- pattern = rf"((?:{archive_pattern}{metadata_pattern})|{archiveonly_pattern})$"
+ pattern = rf"((?:{metadata_artifact_pattern}{metadata_pattern})|{artifact_pattern})$"
return pattern
diff --git a/atr/routes/files.py b/atr/routes/files.py
index 4186379..4e30497 100644
--- a/atr/routes/files.py
+++ b/atr/routes/files.py
@@ -228,7 +228,7 @@ async def root_files_list(session: CommitterSession, project_name: str, version_
path_substitutions[path] = "none"
search = re.search(analysis.extension_pattern(), path)
if search:
- if search.group("archiveonly"):
+ if search.group("artifact"):
path_artifacts.add(path)
elif search.group("metadata"):
path_metadata.add(path)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org