mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-15 02:33:15 -06:00
- server/version.js: shared version helper that reads the root VERSION file once (fallback 0.0.0). Replaces the stale hardcoded 1.2.0 / 1.5.1 / 1.0.0 fallbacks in /api/version, /api/update/check, and /api/status. - config.js: DATA_DIR / DB_PATH / UPLOADS_DIR / CERTS_DIR env overrides for the db, uploads, and certs/jwt-secret locations. Unset resolves to exactly the legacy in-repo paths, so existing installs (including production) are byte-for-byte unchanged. Guarded by test/config-paths.test.js. - package.json: rename remote-display-server -> screentinker (+ lockfile name). - scripts/bump-version.sh: one-shot bump across VERSION, package.json (+lock), android (versionName and versionCode + 1), and the tizen widget version; makes one commit plus an annotated tag; prints the push command, never pushes. - .gitignore: global *.db / *.db-wal / *.db-shm / *.db.* so no database file (including .db.devbak backups, at any path) can be committed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
562 B
JavaScript
14 lines
562 B
JavaScript
// Single source of truth for the running version string. Reads the root VERSION
|
|
// file once at load (the version only changes across a deploy, which restarts the
|
|
// process). Fallback '0.0.0' so a stale literal can never masquerade as a real
|
|
// release - replaces the old hardcoded '1.2.0' / '1.5.1' fallbacks.
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
let version = '0.0.0';
|
|
try {
|
|
version = fs.readFileSync(path.join(__dirname, '..', 'VERSION'), 'utf8').trim() || '0.0.0';
|
|
} catch { /* keep the 0.0.0 fallback */ }
|
|
|
|
module.exports = version;
|