DC-002: Sync root VERSION with package.json + keep them in sync via release.sh
- Updated root VERSION file from 1.13.0 → 1.13.4 to match package.json. - scripts/release.sh now writes both files on every release bump, and stages VERSION alongside package.json in the release commit. - This prevents the drift that caused the stale VERSION in the first place.
This commit is contained in:
+2
-1
@@ -16,9 +16,10 @@
|
|||||||
- **result:** Root cause: routes used `/:serviceId/credentials` (missing `/services/` segment). All 3 credential routes (POST/DELETE/GET) in `routes/services.js` had the wrong path. Fixed to `/services/:serviceId/credentials` — matches the URL pattern used by the live frontend and all 759 tests pass.
|
- **result:** Root cause: routes used `/:serviceId/credentials` (missing `/services/` segment). All 3 credential routes (POST/DELETE/GET) in `routes/services.js` had the wrong path. Fixed to `/services/:serviceId/credentials` — matches the URL pattern used by the live frontend and all 759 tests pass.
|
||||||
|
|
||||||
### DC-002: Sync VERSION file
|
### DC-002: Sync VERSION file
|
||||||
- **status:** in-progress
|
- **status:** done
|
||||||
- **owner:** hermes
|
- **owner:** hermes
|
||||||
- **details:** `/root/dashcaddy/VERSION` says `1.13.0` but `package.json` says `1.13.4`. VERSION file should always match package.json. Add a pre-commit or post-version bump hook to keep them in sync.
|
- **details:** `/root/dashcaddy/VERSION` says `1.13.0` but `package.json` says `1.13.4`. VERSION file should always match package.json. Add a pre-commit or post-version bump hook to keep them in sync.
|
||||||
|
- **result:** Fixed root VERSION to 1.13.4. Updated `scripts/release.sh` to write both `dashcaddy-api/package.json` AND root `VERSION` on every release — also stages VERSION in the release commit. No more drift.
|
||||||
|
|
||||||
### DC-003: Remove stale test/debug files from repo root
|
### DC-003: Remove stale test/debug files from repo root
|
||||||
- **status:** todo
|
- **status:** todo
|
||||||
|
|||||||
+6
-3
@@ -43,14 +43,17 @@ echo " release: $RELEASE_HOST"
|
|||||||
echo " mirror: $MIRROR_HOST"
|
echo " mirror: $MIRROR_HOST"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# ── 1. Bump dashcaddy-api/package.json ────────────────────────────────────
|
# ── 1. Bump dashcaddy-api/package.json + root VERSION file ──────────────
|
||||||
echo "[1/6] Bumping dashcaddy-api/package.json"
|
echo "[1/6] Bumping dashcaddy-api/package.json + VERSION"
|
||||||
node -e "
|
node -e "
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const pkg = require('./dashcaddy-api/package.json');
|
const pkg = require('./dashcaddy-api/package.json');
|
||||||
pkg.version = '$VERSION';
|
pkg.version = '$VERSION';
|
||||||
fs.writeFileSync('./dashcaddy-api/package.json', JSON.stringify(pkg, null, 2) + '\n');
|
fs.writeFileSync('./dashcaddy-api/package.json', JSON.stringify(pkg, null, 2) + '\n');
|
||||||
"
|
"
|
||||||
|
# Keep root VERSION in sync with package.json — otherwise downstream tooling
|
||||||
|
# (installer, status page, rollback checks) reads a stale version.
|
||||||
|
echo "$VERSION" > VERSION
|
||||||
|
|
||||||
# ── 2. Rebuild status frontend so dist/*.js matches source ────────────────
|
# ── 2. Rebuild status frontend so dist/*.js matches source ────────────────
|
||||||
if [[ -f status/build.js ]]; then
|
if [[ -f status/build.js ]]; then
|
||||||
@@ -60,7 +63,7 @@ fi
|
|||||||
|
|
||||||
# ── 3. Commit + push ──────────────────────────────────────────────────────
|
# ── 3. Commit + push ──────────────────────────────────────────────────────
|
||||||
echo "[3/6] Committing + pushing"
|
echo "[3/6] Committing + pushing"
|
||||||
git add dashcaddy-api/package.json
|
git add dashcaddy-api/package.json VERSION
|
||||||
# Everything the build rewrites must be staged or the tarball ships stale
|
# Everything the build rewrites must be staged or the tarball ships stale
|
||||||
# copies. status/dist/ is .gitignored (-f bypasses); index.html and sw.js are
|
# copies. status/dist/ is .gitignored (-f bypasses); index.html and sw.js are
|
||||||
# tracked but get rewritten by build.js (CSP hash + SW cache tag derived from
|
# tracked but get rewritten by build.js (CSP hash + SW cache tag derived from
|
||||||
|
|||||||
Reference in New Issue
Block a user