From a34a284d7750f9dd7aeb08b0406078265b95e585 Mon Sep 17 00:00:00 2001 From: primal Date: Sun, 1 Feb 2026 18:01:04 -0500 Subject: [PATCH] Use Unix timestamp for cache busting, remove version display Co-Authored-By: Claude Opus 4.5 --- .launch.sh | 12 +++++------- templates.go | 6 ++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.launch.sh b/.launch.sh index 74f89c3..0575cfc 100755 --- a/.launch.sh +++ b/.launch.sh @@ -1,15 +1,13 @@ #!/bin/bash cd "$(dirname "$0")" -# Increment version number in templates.go -VERSION=$(grep -oE 'v[0-9]+' 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 "$@" diff --git a/templates.go b/templates.go index 19454e1..834496d 100644 --- a/templates.go +++ b/templates.go @@ -445,8 +445,8 @@ const dashboardHTML = ` 1440.news Feed Crawler - - + +
@@ -547,8 +547,6 @@ const dashboardHTML = `
-
v220
-
Last updated: {{.UpdatedAt.Format "2006-01-02 15:04:05"}}
`