-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Releasing a new version of the SITMUN Application Stack requires updating the version string in many places by hand: backend and proxy build.gradle, both frontend package.json, root and subproject README badges, backend application.yml, API doc YAMLs, frontend environment files, and profile .env files. It’s easy to miss one or get out of sync (e.g. proxy still at 1.2.3 while the rest is 1.2.4). There is no single source of truth, so every release is error-prone and tedious.
Describe the solution you'd like
- A single source of truth: a root-level
VERSIONfile (one line, e.g.1.2.4). - A script
tools/scripts/bump-version.shthat:- Propagates the version from
VERSIONto all consumer files (or, when given a version argument, writesVERSIONand then propagates), using targeted match/replace only so we never change dependency versions, protocol versions, or seed data. - Supports
--dry-runto show every change that would be made without writing anything. - Supports
--statusto report the current version inVERSIONand in each consumer file and to flag mismatches.
- Propagates the version from
- After updating the files, the script runs
npm install --package-lock-onlyin both frontend app dirs sopackage-lock.jsonstays in sync. - When
VERSIONdoes not exist:- propagate without version arg → exit 1 with a clear message
- propagate with version arg → create
VERSIONand propagate (bootstrap).
- When npm fails → exit 1 and state that the files were updated but lockfiles were not; suggest manual npm or re-run with the same version.
- The file list and match/replace patterns should be config-driven (separate data file or one editable block in the script) so that adding a new versioned component only requires adding a config entry, not changing the script’s control flow.
Describe alternatives you've considered
- Global search-replace of the version string across the repo: too risky (would change dependency versions, WMS/WFS protocol versions, seed schema
"version": "1.0", etc.). Prefer one targeted pattern per file type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request