Skip to content

Commit f60f2ce

Browse files
authored
Merge pull request #310 from ligangty/radas-umb
RADAS: add default ignore patterns for signing
2 parents e32526b + 821599b commit f60f2ce

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

charon.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%global owner Commonjava
22
%global modulename charon
33

4-
%global charon_version 1.3.3
4+
%global charon_version 1.4.0
55
%global sdist_tar_name %{modulename}-%{charon_version}
66

77
%global python3_pkgversion 3

charon/cmd/cmd_sign.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from charon.config import get_config
1919
from charon.pkgs.radas_sign import sign_in_radas
2020
from charon.cmd.internal import _decide_mode
21+
from charon.constants import DEFAULT_RADAS_SIGN_IGNORES
2122

2223
from click import command, option, argument
2324

@@ -98,8 +99,7 @@ def sign(
9899
ignore_patterns: List[str] = None,
99100
config: str = None,
100101
debug=False,
101-
quiet=False,
102-
dryrun=False
102+
quiet=False
103103
):
104104
"""Do signing against files in the repo zip in repo_url through
105105
radas service. The repo_url points to the maven zip repository
@@ -119,8 +119,10 @@ def sign(
119119
sys.exit(1)
120120
# All ignore files in global config should also be ignored in signing.
121121
ig_patterns = conf.get_ignore_patterns()
122+
ig_patterns.extend(DEFAULT_RADAS_SIGN_IGNORES)
122123
if ignore_patterns:
123124
ig_patterns.extend(ignore_patterns)
125+
ig_patterns = list(set(ig_patterns))
124126
args = {
125127
"repo_url": repo_url,
126128
"requester": requester,

charon/constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,8 @@
177177
DEFAULT_REGISTRY = "localhost"
178178
DEFAULT_RADAS_SIGN_TIMEOUT_RETRY_COUNT = 10
179179
DEFAULT_RADAS_SIGN_TIMEOUT_RETRY_INTERVAL = 60
180+
181+
DEFAULT_RADAS_SIGN_IGNORES = [
182+
r".*\.md5$", r".*\.sha1$", r".*\.sha128$", r".*\.sha256$",
183+
r".*\.sha512$", r".*\.asc$"
184+
]

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = ["setuptools", "setuptools-scm"]
44

55
[project]
66
name = "charon"
7-
version = "1.3.3"
7+
version = "1.4.0"
88
authors = [
99
{name = "RedHat EXD SPMM"},
1010
]
@@ -107,4 +107,4 @@ ignore = [
107107
]
108108
per-file-ignores = [
109109
"tests/*:D101,D102,D103", # missing docstring in public class, method, function
110-
]
110+
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616
from setuptools import setup, find_packages
1717

18-
version = "1.3.3"
18+
version = "1.4.0"
1919

2020
long_description = """
2121
This charon is a tool to synchronize several types of

0 commit comments

Comments
 (0)