This commit is contained in:
parent
4cef77e4e0
commit
3dc623f1c7
3 changed files with 18 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "zona"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
description = "Opinionated static site generator."
|
||||
license = "BSD-3-Clause "
|
||||
license-files = ["LICENSE"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from importlib.metadata import version as __version__
|
||||
from pathlib import Path
|
||||
from typing import Annotated
|
||||
|
||||
|
@ -134,8 +135,23 @@ def serve(
|
|||
)
|
||||
|
||||
|
||||
def version_callback(value: bool):
|
||||
if value:
|
||||
print(f"Zona version: {__version__('zona')}")
|
||||
raise typer.Exit()
|
||||
|
||||
|
||||
@app.callback()
|
||||
def main_entry(
|
||||
version: Annotated[ # pyright: ignore[reportUnusedParameter]
|
||||
bool | None,
|
||||
typer.Option(
|
||||
"--version",
|
||||
callback=version_callback,
|
||||
is_eager=True,
|
||||
help="Print version info and exit.",
|
||||
),
|
||||
] = None,
|
||||
verbosity: Annotated[
|
||||
str,
|
||||
typer.Option(
|
||||
|
|
2
uv.lock
generated
2
uv.lock
generated
|
@ -459,7 +459,7 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "zona"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "dacite" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue