mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
* build: adopt hatch-vcs dynamic versioning (#526) Replace the static `version = "1.0.2"` with `dynamic = ["version"]` and derive the version from git tags via hatch-vcs, so source and editable checkouts report their true git describe version (e.g. 1.0.3.dev110+g<sha>) instead of a stale constant. Config notes: - Exclude .dev/.rc/desktop-* tags from derivation. setuptools_scm cannot bump custom .devN tags, so the base is taken from the latest plain release tag (vX.Y.Z) and the dev distance from commit count. - Add fallback_version so builds without a git checkout (shallow CI clones, Docker COPY src/, source-zip installs) resolve to a sentinel instead of hard-failing. CI release builds inject the exact version via SETUPTOOLS_SCM_PRETEND_VERSION. * ci(autotag): derive dev base from the latest release tag (#526) pyproject no longer carries a static version, so read the base from the latest plain release tag (vX.Y.Z) reachable from HEAD instead of grepping pyproject. .dev/.rc/desktop-* tags are excluded so they cannot be mistaken for the release base. The computed tag (vX.Y.Z.devN) is unchanged. * ci(pypi-publish): pin build version from tag, drop sed injection (#526) With dynamic versioning there is no static line to sed. Pin the exact build version from the pushed tag via SETUPTOOLS_SCM_PRETEND_VERSION so the published version equals the tag. This is required, not cosmetic: a naive hatch-vcs build emits 1.0.3.devN+g<sha>, and PyPI rejects local version segments on upload. Also add a dry_run input that targets TestPyPI instead of PyPI, for validating the release path without a production upload. * ci(desktop): derive dispatch-fallback version from release tag (#526) The workflow_dispatch fallback grepped the now-removed static pyproject version. Derive its base from the latest release tag instead (matching autotag), and give the build-and-release checkout full history and tags so the derivation works. --------- Co-authored-by: Jon Saad-Falcon <jonsaadfalcon@gmail.com>