fix(updater): stop false-positive "update available" loop when commit is unknown
Dockerfile never received DASHCADDY_COMMIT at build, so /app/VERSION held
'unknown'. _isNewer then treated same-version-different-commit as newer,
making the auto-updater rebuild the container indefinitely (each rebuild
still produced commit='unknown').
- self-updater._isNewer: normalize commits; treat unknown/null/empty as no
commit info and fall back to pure version comparison
- self-updater._autoCheckAndApply + routes/updates: refuse to apply when
local version >= remote version (belt-and-suspenders)
- update-management.js: hide '(unknown)' from version label
- Dockerfile: COPY VERSION instead of writing from build arg
- VERSION: committed placeholder ('dev'); scripts/release.sh now writes
the real short SHA into the tarball's VERSION before tar-ing, so every
published release ships with an accurate commit
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,9 @@ ssh "$RELEASE_HOST" "set -e
|
||||
fi
|
||||
rm -rf .git
|
||||
find . -type d -name node_modules -exec rm -rf {} + 2>/dev/null || true
|
||||
# Bake the actual commit SHA into the api VERSION file so containers built
|
||||
# from this tarball report a real commit (not the 'dev' placeholder).
|
||||
echo \"$COMMIT\" > dashcaddy-api/VERSION
|
||||
cd /tmp/dashcaddy-build
|
||||
tar zcf dashcaddy-$VERSION.tar.gz dashcaddy/
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user