-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (23 loc) · 799 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
S3_BUCKET = rcj-sam-packages
STACK_NAME = srdbot
build:
@mkdir -p dist
@for handler in `ls handlers`; do \
GOOS=linux go build -o dist/$$handler handlers/$$handler/*.go ;\
done
test:
@for handler in `ls handlers`; do \
BASE=`pwd`; \
cd handlers/$$handler; \
go test -v; \
cd $$BASE; \
done
clean:
@rm -rf dist
package:
@aws cloudformation package --template-file template.yaml --s3-bucket $(S3_BUCKET) --output-template-file package.yaml
deploy: package
@aws cloudformation deploy --template-file package.yaml --capabilities CAPABILITY_IAM --stack-name $(STACK_NAME)
@#aws cloudformation describe-stacks --stack-name $(STACK_NAME) | jq '.Stacks[0].Outputs[] | select(.OutputKey=="Endpoint").OutputValue'
destroy:
@aws cloudformation delete-stack --stack-name $(STACK_NAME)