Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review: preserve full prerelease in semver compare, atomic update marker write
Adam Eivyb85c7a7496c3
diff --git a/scripts/portos-update.sh b/scripts/portos-update.shindex ea5a15f112..b6d5141563 100755--- a/scripts/portos-update.sh+++ b/scripts/portos-update.sh@@ -60,8 +60,9 @@ step "restart" "running" "Restarting PortOS..."log "=== PortOS update to $TAG restarting ==="-# Write completion marker before restart so server reads it on boot-echo "{\"version\":\"${TAG#v}\",\"completedAt\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > "$ROOT_DIR/data/update-complete.json"+# Write completion marker atomically before restart so server reads it on boot+echo "{\"version\":\"${TAG#v}\",\"completedAt\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > "$ROOT_DIR/data/update-complete.json.tmp"+mv "$ROOT_DIR/data/update-complete.json.tmp" "$ROOT_DIR/data/update-complete.json"# Use the local pm2 binary to restartnode "$ROOT_DIR/node_modules/pm2/bin/pm2" restart ecosystem.config.cjs >> "$LOG_FILE" 2>&1diff --git a/server/services/updateChecker.js b/server/services/updateChecker.jsindex d7302b2709..dd7789578f 100644--- a/server/services/updateChecker.js+++ b/server/services/updateChecker.js@@ -42,7 +42,10 @@ export async function getCurrentVersion() {*/export function compareSemver(a, b) {const extractParts = (v) => {- const [core, pre] = v.split('+')[0].split('-', 2);+ const noBuild = v.split('+')[0];+ const hyphenIdx = noBuild.indexOf('-');+ const core = hyphenIdx === -1 ? noBuild : noBuild.slice(0, hyphenIdx);+ const pre = hyphenIdx === -1 ? null : noBuild.slice(hyphenIdx + 1);return { nums: core.split('.').map(Number), pre: pre || null };};const comparePreRelease = (preA, preB) => {