From dc14c0691965079c01e9f2ee069e2954c9b69524 Mon Sep 17 00:00:00 2001 From: mikeCRL Date: Mon, 17 Nov 2025 14:47:15 -0500 Subject: [PATCH] Add 'Make git-retry': pushes latest commit with new SHA to get new preview build --- src/current/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/current/Makefile b/src/current/Makefile index cabb6b0511c..57d4312a0da 100644 --- a/src/current/Makefile +++ b/src/current/Makefile @@ -103,3 +103,19 @@ clean-site: clean-cache: rm -rf .jekyll-cache + +.PHONY: git-retry +git-retry: + @echo "This will replace the last commit on the remote branch with an identical one," + @echo "except for its timestamp and SHA, to kick off a new preview build." + @read -p "Proceed? (y/N): " confirm && \ + if [ "$$confirm" = "y" ] || [ "$$confirm" = "Y" ]; then \ + BRANCH=$$(git rev-parse --abbrev-ref HEAD); \ + echo "Working on branch: $$BRANCH"; \ + git pull && \ + git commit --amend --no-edit --allow-empty && \ + git push --force origin $$BRANCH && \ + echo "✓ Successfully pushed amended commit to $$BRANCH"; \ + else \ + echo "Aborted."; \ + fi