Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
# pyproject.toml
sed -i -E "s/^version = \".*\"/version = \"${TAG}\"/" pyproject.toml

# aisisstant-setup VERSION constant
sed -i -E "s/^VERSION = \".*\"/VERSION = \"${TAG}\"/" aisisstant-setup
# aisisstant-setup bundled fallback version (runtime prefers importlib.metadata)
sed -i -E "s/^_BUNDLED_VERSION = \".*\"/_BUNDLED_VERSION = \"${TAG}\"/" aisisstant-setup

# debian/changelog — prepend new entry
DATE_RFC=$(date -R)
Expand Down
21 changes: 20 additions & 1 deletion aisisstant-setup
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,26 @@ APP_ID = "com.aisisstant.Setup"
SERVICE_NAME = "aisisstant.service"
EXTENSION_UUID = "aisisstant-tracker@vovkes"
DB_CONTAINER = "aisisstant-db"
VERSION = "2026.04.16"

# CI patches _BUNDLED_VERSION at release time (see .github/workflows/ci-deploy.yml).
# Runtime lookup below prefers the installed package metadata, so pip/source
# installs show the real version even if this constant is stale.
_BUNDLED_VERSION = "2026.04.16"


def _resolve_version() -> str:
try:
from importlib.metadata import version as _pkg_version
raw = _pkg_version("aisisstant")
except Exception:
return _BUNDLED_VERSION
parts = raw.split(".")
if len(parts) >= 3:
return ".".join([parts[0]] + [p.zfill(2) for p in parts[1:3]] + parts[3:])
return raw


VERSION = _resolve_version()

CONFIG_DIR = Path.home() / ".config" / "aisisstant"
CONFIG_FILE = CONFIG_DIR / "config.json"
Expand Down
Loading