#!/bin/bash # Find the file containing the draft DRAFT_FILE=$(grep -rl "^status: draft" content/editions/ | head -n 1) if [ -z "$DRAFT_FILE" ]; then echo "❌ Error: No open drafts found to publish." exit 1 fi # Flip the status using sed sed -i 's/^status: draft/status: published/' "$DRAFT_FILE" echo "✅ Success! Flipped status to published." echo "📰 Run 'make build' to generate the archive, then commit and merge to main."