From 9a046f33d1b18d9f39f0f7829ff3dac43abb77e0 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Wed, 4 Oct 2017 20:43:30 +0200 Subject: [PATCH] Reset production branch when releasing. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea1900c..c0a09e0 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ devserver: release: @echo "Building production site into $(PROD_DIST_DIR)" @jekyll build --destination $(PROD_DIST_DIR) - @echo "Pushing $(PROD_DIST_DIR) contents to the upstream production branch" + @echo "Resetting existing production branch" + @git push $(PROD_REMOTE) $(PROD_BRANCH) --delete + @echo "Pushing latest $(PROD_DIST_DIR) contents to the upstream production branch" @git subtree push --prefix $(PROD_DIST_DIR) $(PROD_REMOTE) $(PROD_BRANCH) .PHONY: release