Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 1.6] Print version only of pre-installed application and c2cciutils #1921

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions c2cciutils/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,8 @@ class K8SConfiguration(TypedDict, total=False):
{"name": "npm", "prefix": "npm ", "cmd": ["npm", "--version"]},
{"name": "make", "cmd": ["make", "--version"], "prefix": "make "},
{"name": "docker", "cmd": ["docker", "--version"]},
{"name": "docker-compose", "cmd": ["docker-compose", "--version"]},
{"name": "docker compose", "cmd": ["docker", "compose", "version"]},
{"name": "java", "cmd": ["java", "-version"]},
{"name": "kubectl", "cmd": ["kubectl", "version"]},
{"name": "helm", "cmd": ["helm", "version"]},
]
""" Default value of the field path 'Print versions versions' """
Expand Down Expand Up @@ -528,17 +527,14 @@ class PrintVersions(TypedDict, total=False):
- --version
name: docker
- cmd:
- docker-compose
- --version
name: docker-compose
- docker
- compose
- version
name: docker compose
- cmd:
- java
- -version
name: java
- cmd:
- kubectl
- version
name: kubectl
- cmd:
- helm
- version
Expand Down
3 changes: 1 addition & 2 deletions c2cciutils/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,8 @@
{ "name": "npm", "prefix": "npm ", "cmd": ["npm", "--version"] },
{ "name": "make", "cmd": ["make", "--version"], "prefix": "make " },
{ "name": "docker", "cmd": ["docker", "--version"] },
{ "name": "docker-compose", "cmd": ["docker-compose", "--version"] },
{ "name": "docker compose", "cmd": ["docker", "compose", "version"] },
{ "name": "java", "cmd": ["java", "-version"] },
{ "name": "kubectl", "cmd": ["kubectl", "version"] },
{ "name": "helm", "cmd": ["helm", "version"] }
],
"items": {
Expand Down
2 changes: 1 addition & 1 deletion c2cciutils/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main() -> None:
print(yaml.dump(c2cciutils.get_config(), default_flow_style=False, Dumper=yaml.SafeDumper))

if args.version:
for pkg in ("c2cciutils", "black", "isort"):
for pkg in ("c2cciutils", "black", "isort", "codespell"):
try:
print(f"{pkg} {pkg_resources.get_distribution(pkg).version}")
except pkg_resources.DistributionNotFound:
Expand Down
2 changes: 1 addition & 1 deletion config.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ _C2C CI utils configuration file_
- **Items** _(string)_
-
- <a id="definitions/print_versions"></a>**`print_versions`** _(object)_: The print versions configuration.
- **`versions`** _(array)_: Default: `[{"name": "c2cciutils", "cmd": ["c2cciutils", "--version"]}, {"name": "python", "cmd": ["python3", "--version"]}, {"name": "pip", "cmd": ["python3", "-m", "pip", "--version"]}, {"name": "twine", "cmd": ["twine", "--version"]}, {"name": "node", "prefix": "node ", "cmd": ["node", "--version"]}, {"name": "npm", "prefix": "npm ", "cmd": ["npm", "--version"]}, {"name": "make", "cmd": ["make", "--version"], "prefix": "make "}, {"name": "docker", "cmd": ["docker", "--version"]}, {"name": "docker-compose", "cmd": ["docker-compose", "--version"]}, {"name": "java", "cmd": ["java", "-version"]}, {"name": "kubectl", "cmd": ["kubectl", "version"]}, {"name": "helm", "cmd": ["helm", "version"]}]`.
- **`versions`** _(array)_: Default: `[{"name": "c2cciutils", "cmd": ["c2cciutils", "--version"]}, {"name": "python", "cmd": ["python3", "--version"]}, {"name": "pip", "cmd": ["python3", "-m", "pip", "--version"]}, {"name": "twine", "cmd": ["twine", "--version"]}, {"name": "node", "prefix": "node ", "cmd": ["node", "--version"]}, {"name": "npm", "prefix": "npm ", "cmd": ["npm", "--version"]}, {"name": "make", "cmd": ["make", "--version"], "prefix": "make "}, {"name": "docker", "cmd": ["docker", "--version"]}, {"name": "docker compose", "cmd": ["docker", "compose", "version"]}, {"name": "java", "cmd": ["java", "-version"]}, {"name": "helm", "cmd": ["helm", "version"]}]`.
- **Items** _(object)_
- **`cmd`** _(array)_: The command that should be used.
- **Items** _(string)_
Expand Down
Loading