Use Unix timestamp for cache busting, remove version display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
primal
2026-02-01 18:01:04 -05:00
parent 49c2370d84
commit a34a284d77
2 changed files with 7 additions and 11 deletions
+5 -7
View File
@@ -1,15 +1,13 @@
#!/bin/bash
cd "$(dirname "$0")"
# Increment version number in templates.go
VERSION=$(grep -oE 'v[0-9]+</div>' templates.go | grep -oE '[0-9]+')
NEW_VERSION=$((VERSION + 1))
sed -i '' "s/v${VERSION}<\\/div>/v${NEW_VERSION}<\\/div>/" templates.go
# Use Unix timestamp for cache busting
TS=$(date +%s)
# Update CSS and JS cache-busting versions
sed -i '' "s/dashboard\\.css?v=[0-9]*/dashboard.css?v=${NEW_VERSION}/" templates.go
sed -i '' "s/dashboard\\.js?v=[0-9]*/dashboard.js?v=${NEW_VERSION}/" templates.go
sed -i '' "s/dashboard\\.css?v=[0-9]*/dashboard.css?v=${TS}/" templates.go
sed -i '' "s/dashboard\\.js?v=[0-9]*/dashboard.js?v=${TS}/" templates.go
echo "Version: v${VERSION} → v${NEW_VERSION}"
echo "Cache bust: ${TS}"
~/apps/.launch.sh "$@"