mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-31 02:04:40 +08:00
af43701daf
* fix(version): resolve app version at runtime in node entry E2E runs the Node server via tsx, which bypasses the tsup build-time define, leaving __ZPAN_APP_VERSION__ unset so getAppVersion throws and /api/licensing/pair returns 500. Resolve the version at runtime via resolveAppVersion (git describe) when the global is unset; in the built output the define inlines the constant, so the branch is never reached and git is not invoked in production. Keeps the git-describe version as the single source of truth across all paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(version): inject app version into docker build The Docker build excludes .git from its context (.dockerignore), so the build-time git describe in build:node would throw and break the image build. Let resolveAppVersion read ZPAN_APP_VERSION, set it from an APP_VERSION build arg in the builder stage, and pass the release tag from the release workflow. git describe stays the default everywhere else, so the version is unified across CF Workers, tsx, and Docker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>