Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Makefile
- COMMITID=$(shell git rev-parse HEAD)
- ifndef AWS_DEFAULT_REGION
- AWS_DEFAULT_REGION = $(shell aws configure get region)
- endif
- ifndef AWS_REGION
- AWS_REGION = ${AWS_DEFAULT_REGION}
- endif
- all : deploy-stack
- .PHONY : all
- deploy-stack: env-STACK_NAME
- aws cloudformation deploy --template-file "$(PWD)/master.yml" \
- --stack-name $(STACK_NAME) \
- --capabilities CAPABILITY_NAMED_IAM
- delete-stack: env-STACK_NAME
- aws cloudformation delete-stack \
- --stack-name $(STACK_NAME)
- # Check for specific environment variables
- env-%:
- @ if [ "${${*}}" = "" ]; then \
- echo "Environment variable $* not set"; \
- exit 1; \
- fi
Add Comment
Please, Sign In to add comment