Skip to content

Commit

Permalink
Merge pull request #66 from mole99/version
Browse files Browse the repository at this point in the history
Add `--version` argument
  • Loading branch information
mole99 authored May 23, 2024
2 parents 264e048 + 226a1a6 commit 72573fb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 2.2.5

## CLI

- Add `--version` argument

## GUI

- Add `--version` argument

# 2.2.4

## Common
Expand Down
2 changes: 1 addition & 1 deletion cace/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = '2.2.4'
__version__ = '2.2.5'

if __name__ == '__main__':
print(__version__, end='')
7 changes: 7 additions & 0 deletions cace/cace_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import signal
import argparse

from .__version__ import __version__

from .common.simulation_manager import SimulationManager


Expand All @@ -37,6 +39,11 @@ def cli():
epilog='Online documentation at: https://cace.readthedocs.io/',
)

# version number
parser.add_argument(
'--version', action='version', version=f'%(prog)s {__version__}'
)

# positional argument
parser.add_argument(
'datasheet', nargs='?', help='format 4.0 ASCII CACE file'
Expand Down
7 changes: 7 additions & 0 deletions cace/cace_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
from tkinter import ttk
from tkinter import filedialog

from .__version__ import __version__

from .gui.style import init_style
from .gui.tksimpledialog import *
from .gui.tooltip import *
Expand Down Expand Up @@ -1196,6 +1198,11 @@ def gui():
epilog='Online documentation at: https://cace.readthedocs.io/',
)

# version number
parser.add_argument(
'--version', action='version', version=f'%(prog)s {__version__}'
)

# positional argument, optional
parser.add_argument(
'datasheet',
Expand Down

0 comments on commit 72573fb

Please sign in to comment.