feat(version): automate version computation from git tags #292
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/auto-version-computation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Pipeline-computed version replaces manual version files. No more version drift or manual bumps.
Changes
scripts/ci/compute-version.sh— computesMAJOR.MINOR.{commit_count}from git tagsscripts/ci/detect-scopes.sh— removed version extraction (path detection only).forgejo/workflows/build-deploy.yml— version step, outputs from compute-version.shapps/web/vite.config.ts— definesVITE_APP_VERSIONfromMEMORIES_APP_VERSIONapps/web/src/lib/appVersion.ts— reads fromimport.meta.envapps/web/Dockerfile— passesMEMORIES_APP_VERSIONARG to Vite buildapps/web/package.json→0.0.0,application.yml→dev,tools/cli/package.json→0.0.0Version flow
compute-version.shreads git tags →0.61.5MEMORIES_APP_VERSIONenv var in build/deploy jobsdefineinjects at build timeapplication.ymlreads from env varLocal dev
dev(no tag fallback)0.0.{commit_count}if tags exist locallyPost-merge
Tag
v0.61on main to anchor first computed version.- Add scripts/ci/compute-version.sh: MAJOR.MINOR.{commit_count} from tags - Remove version extraction from detect-scopes.sh (path detection only) - Update build-deploy.yml: version step, outputs from compute-version.sh - Vite define injects MEMORIES_APP_VERSION as VITE_APP_VERSION - appVersion.ts reads from import.meta.env instead of package.json - Dockerfile passes MEMORIES_APP_VERSION ARG to Vite build - Zero out version placeholders: 0.0.0 / dev in all source files