Skip to content

Commit

Permalink
Add --version option to the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Feb 4, 2024
1 parent da1cdaf commit 22fcf8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:

- name: Test Executable
run: |
./build/osam.bin --version
if [ '${{ matrix.os }}' == 'windows-latest' ]; then
./build/osam.exe --version
else
./build/osam.bin --version
fi
- name: Rename Executable
run: |
Expand Down
2 changes: 2 additions & 0 deletions osam/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import uvicorn
from loguru import logger

from osam import __version__
from osam import _humanize
from osam import _models
from osam import _tabulate
Expand All @@ -18,6 +19,7 @@


@click.group(context_settings=dict(help_option_names=["-h", "--help"]))
@click.version_option(__version__)
def cli():
logger.remove(0)
logger.add(
Expand Down

0 comments on commit 22fcf8f

Please sign in to comment.