Last active
December 24, 2015 00:59
-
-
Save rcy/6720157 to your computer and use it in GitHub Desktop.
branch specific deployments to %.meteor.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT=myapp | |
BRANCH=$(shell git branch | sed -n '/\* /s///p') | |
TAG=deploy-${BRANCH}-$(shell echo -n `date +%Y%m%d%H%M%S`) | |
ifeq (${BRANCH}, master) | |
TARGET=${PROJECT}.meteor.com | |
else | |
TARGET=${BRANCH}-${PROJECT}.meteor.com | |
endif | |
all: | |
@echo current branch is ${BRANCH} | |
@echo use: \"make deploy\" to deploy to ${TARGET} and git tag ${TAG} | |
deploy: | |
cd app && mrt deploy ${TARGET} --password | |
git tag ${TAG} | |
destroy: | |
@echo "WARNING! THIS WILL DELETE THE APPLICATION AND DATABASE ON ${TARGET}" | |
@echo "TYPE 'DELETE' TO PROCEED" | |
@read a ; /usr/bin/test "$$a" == "DELETE" | |
cd app && mrt deploy ${TARGET} --delete | |
reset: destroy deploy | |
logs: | |
cd app && mrt logs ${TARGET} | |
.PHONY: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment