#!/usr/bin/env bun /** * Generate changelog section in webpage/index.html from src/lib/data/changelog.json * This ensures a single source of truth for release information */ import { readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; const ROOT_DIR = join(import.meta.dir, '..'); const CHANGELOG_PATH = join(ROOT_DIR, 'src/lib/data/changelog.json'); const INDEX_PATH = join(ROOT_DIR, 'webpage/index.html'); interface ChangelogEntry { version: string; date: string; changes: Array<{ type: 'feature' | 'fix'; text: string }>; imageTag: string; } // SVG icons for change types const FEATURE_SVG = ``; const FIX_SVG = ``; const TOGGLE_SVG = ``; const COPY_SVG = ``; function formatDate(dateStr: string): string { const date = new Date(dateStr); return date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); } function generateChangeItem(change: { type: 'feature' | 'fix'; text: string }): string { const pillClass = change.type === 'feature' ? 'changelog-pill-feature' : 'changelog-pill-fix'; const svg = change.type === 'feature' ? FEATURE_SVG : FIX_SVG; const label = change.type === 'feature' ? 'New' : 'Fix'; return `
${entry.imageTag}
or
fnsys/dockhand:latest
${entry.imageTag}
Track our progress and see what's new in each version. Spoiler: it gets better every time.