Fix CSS/JS cache busting - sync versions on launch
.launch.sh now updates CSS and JS query params to match app version. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/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
|
||||
|
||||
# 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
|
||||
|
||||
echo "Version: v${VERSION} → v${NEW_VERSION}"
|
||||
|
||||
~/apps/.launch.sh "$@"
|
||||
Reference in New Issue
Block a user