mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 11:22:49 -05:00
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
12 lines
351 B
Python
12 lines
351 B
Python
from __future__ import annotations
|
|
|
|
import os
|
|
import re
|
|
|
|
# Must match tag_prefix in pyproject.toml [tool.hatch.build.targets.wheel.hooks.custom]
|
|
TAG_PREFIX = "cli"
|
|
|
|
_tag = os.environ.get("GITHUB_REF_NAME", "v0.0.0-dev").removeprefix(f"{TAG_PREFIX}/")
|
|
_match = re.search(r"v?(\d+\.\d+\.\d+)", _tag)
|
|
__version__ = _match.group(1) if _match else "0.0.0"
|