Something went wrong. Try again.
Pretty website for a WeatherFlow Tempest using InfluxDB via UDP Broadcasts
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738#!/bin/bash# Simple cache busting script - adds git hash to static asset URLs
set -e
# Get current git commit hash (short version)if git rev-parse --short HEAD >/dev/null 2>&1; then VERSION=$(git rev-parse --short HEAD)else # Fallback to timestamp if not in git repo VERSION=$(date +%s)fi
echo "Adding cache-busting version: $VERSION"
# Update index.htmlif [ -f "public/index.html" ]; then echo "Updating public/index.html..." # Replace .css with .css?v=VERSION sed -i.bak "s/\.css\"/\.css?v=$VERSION\"/g" public/index.html # Replace .js with .js?v=VERSION sed -i.bak "s/\.js\"/\.js?v=$VERSION\"/g" public/index.html rm public/index.html.bakfi
# Update hardware.htmlif [ -f "public/hardware.html" ]; then echo "Updating public/hardware.html..." sed -i.bak "s/\.css\"/\.css?v=$VERSION\"/g" public/hardware.html sed -i.bak "s/\.js\"/\.js?v=$VERSION\"/g" public/hardware.html rm public/hardware.html.bakfi
echo "✓ Cache-busting version $VERSION applied"echo ""echo "Modified URLs now include ?v=$VERSION"echo "Deploy these files to force clients to fetch fresh copies"