Created
January 18, 2019 04:43
-
-
Save BigAl/9edff5c7e50bae582441fd10661ba556 to your computer and use it in GitHub Desktop.
makefile
This file contains hidden or 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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment