tag-validate 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tag_validate/__init__.py +41 -0
- tag_validate/_version.py +34 -0
- tag_validate/cli.py +1140 -0
- tag_validate/github_keys.py +569 -0
- tag_validate/models.py +202 -0
- tag_validate/signature.py +565 -0
- tag_validate/tag_operations.py +576 -0
- tag_validate/validation.py +519 -0
- tag_validate/workflow.py +782 -0
- tag_validate-0.2.0.dist-info/METADATA +752 -0
- tag_validate-0.2.0.dist-info/RECORD +14 -0
- tag_validate-0.2.0.dist-info/WHEEL +4 -0
- tag_validate-0.2.0.dist-info/entry_points.txt +2 -0
- tag_validate-0.2.0.dist-info/licenses/LICENSE +201 -0
tag_validate/__init__.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 The Linux Foundation
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Tag Validate: GitHub tag validation with cryptographic signature verification.
|
|
6
|
+
|
|
7
|
+
This package provides tools for validating Git tags against versioning schemes
|
|
8
|
+
(SemVer, CalVer) and verifying cryptographic signatures (GPG, SSH) with optional
|
|
9
|
+
GitHub key registry verification.
|
|
10
|
+
|
|
11
|
+
Key features:
|
|
12
|
+
- SemVer and CalVer validation
|
|
13
|
+
- GPG and SSH signature detection
|
|
14
|
+
- GitHub API integration for key verification
|
|
15
|
+
- Support for local and remote repositories
|
|
16
|
+
- Comprehensive CLI interface
|
|
17
|
+
|
|
18
|
+
Example usage:
|
|
19
|
+
>>> from tag_validate import TagValidator, ValidationConfig
|
|
20
|
+
>>> config = ValidationConfig(
|
|
21
|
+
... require_type="semver",
|
|
22
|
+
... require_signed="gpg",
|
|
23
|
+
... verify_key_on_github=True
|
|
24
|
+
... )
|
|
25
|
+
>>> validator = TagValidator(config)
|
|
26
|
+
>>> result = await validator.validate_tag("v1.2.3")
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
try:
|
|
30
|
+
from tag_validate._version import __version__
|
|
31
|
+
except ImportError:
|
|
32
|
+
# Fall back to importlib.metadata if _version.py doesn't exist
|
|
33
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
34
|
+
try:
|
|
35
|
+
__version__ = version("tag-validate")
|
|
36
|
+
except PackageNotFoundError:
|
|
37
|
+
__version__ = "unknown"
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"__version__",
|
|
41
|
+
]
|
tag_validate/_version.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
TYPE_CHECKING = False
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from typing import Tuple
|
|
16
|
+
from typing import Union
|
|
17
|
+
|
|
18
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
20
|
+
else:
|
|
21
|
+
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
23
|
+
|
|
24
|
+
version: str
|
|
25
|
+
__version__: str
|
|
26
|
+
__version_tuple__: VERSION_TUPLE
|
|
27
|
+
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
30
|
+
|
|
31
|
+
__version__ = version = '0.2.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = None
|