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 55c1017 commit 5a67ca1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ jobs:
script-name: osam
onefile: true

- name: Test Executable
- name: Test Executable on Linux & macOS
run: |
./build/osam.bin --version
if: matrix.os != 'windows-latest'

- name: Test Executable on Windows
run: |
./build/osam.exe --version
if: matrix.os == 'windows-latest'

- 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 5a67ca1

Please sign in to comment.