Skip to content

Commit

Permalink
Merge pull request #1918 from camptocamp/backport/1915-to-1.3
Browse files Browse the repository at this point in the history
[Backport 1.3] Print version only of pre-installed application and c2cciutils
  • Loading branch information
sbrunner authored Sep 9, 2024
2 parents 892f520 + b8ee775 commit a877f77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions c2cciutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,13 @@ def get_config(branch: Optional[str] = None) -> c2cciutils.configuration.Configu
"print_versions": {
"versions": [
{"name": "c2cciutils", "cmd": ["c2cciutils", "--version"]},
{"name": "codespell", "cmd": ["codespell", "--version"], "prefix": "codespell "},
{"name": "java", "cmd": ["java", "-version"]},
{"name": "python", "cmd": ["python3", "--version"]},
{"name": "pip", "cmd": ["python3", "-m", "pip", "--version"]},
{"name": "node", "prefix": "node ", "cmd": ["node", "--version"]},
{"name": "npm", "prefix": "npm ", "cmd": ["npm", "--version"]},
{"name": "docker", "cmd": ["docker", "--version"]},
{"name": "docker-compose", "cmd": ["docker-compose", "--version"]},
{"name": "kubectl", "cmd": ["kubectl", "version"]},
{"name": "docker compose", "cmd": ["docker", "compose", "version"]},
]
},
"print_config": True,
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

0 comments on commit a877f77

Please sign in to comment.