forked from serverlesspub/imagemagick-aws-lambda-2
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
17 lines (12 loc) · 760 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
STACK_NAME ?= imagemagick-freetype-layer-example
IMAGE_MAGICK_STACK_NAME ?= imagemagick-freetype-layer
IMAGEMAGICK_LAYER ?=$(shell aws cloudformation describe-stacks --stack-name $(IMAGE_MAGICK_STACK_NAME) --query Stacks[].Outputs[].OutputValue --output text)
SOURCES=$(shell find src/)
clean:
rm -rf build
output.yaml: template.yaml $(SOURCES)
mkdir -p build
aws cloudformation package --template-file $< --output-template-file $@ --s3-bucket $(DEPLOYMENT_BUCKET)
deploy: output.yaml
aws cloudformation deploy --template-file $< --stack-name $(STACK_NAME) --capabilities CAPABILITY_IAM --parameter-overrides ImageMagickLayer=$(IMAGEMAGICK_LAYER)
aws cloudformation describe-stacks --stack-name $(STACK_NAME) --query Stacks[].Outputs --output table