Reset production branch when releasing.

This commit is contained in:
Luke Murphy 2017-10-04 20:43:30 +02:00
parent fba2ab9651
commit 9a046f33d1
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 3 additions and 1 deletions

View File

@ -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