Skip to content
Snippets Groups Projects
Commit baf381d7 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

Merge branch 'add-version-attribute' into 'main'

Provide --version functionality

See merge request mpsd-cs/mpsd-software-environments!44
parents 52fef60f 06bae049
No related branches found
No related tags found
1 merge request!44Provide --version functionality
Pipeline #370794 failed
...@@ -83,6 +83,7 @@ style: ...@@ -83,6 +83,7 @@ style:
- pydocstyle mpsd-software.py - pydocstyle mpsd-software.py
- pydocstyle tests.py - pydocstyle tests.py
# we could also use `ruff --select D` for pycodestyle. But the behaviour is not exactly the same. # we could also use `ruff --select D` for pycodestyle. But the behaviour is not exactly the same.
- ./mpsd-software-environment.py --version
test-bullseye: test-bullseye:
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
"""mpsd-software: tool for installation of software as on MPSD HPC.""" """mpsd-software: tool for installation of software as on MPSD HPC."""
__version__ = "2023.6.9"
import argparse import argparse
import datetime import datetime
import logging import logging
...@@ -1035,6 +1037,8 @@ def main(): ...@@ -1035,6 +1037,8 @@ def main():
help="Set the log level", help="Set the log level",
) )
parser.add_argument("--version", action="version", version=__version__)
subparsers = parser.add_subparsers( subparsers = parser.add_subparsers(
dest="action", title="actions", description="valid actions", required=True dest="action", title="actions", description="valid actions", required=True
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment