-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 820 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 820 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
include .env
clean:
@rm -rf dist
@mkdir -p dist
build: clean
@for dir in `ls func`; do \
GOOS=linux go build -o dist/func/$$dir github.com/sampado/aws-lambda-go-api/func/$$dir; \
done
run: build
sam local start-api
test:
go test ./... --cover
package: build
@aws cloudformation package \
--template-file template.yml \
--region $(AWS_REGION) \
--output-template-file package.yml
deploy:
@aws cloudformation deploy \
--template-file package.yml \
--region $(AWS_REGION) \
--capabilities CAPABILITY_IAM \
--stack-name $(AWS_STACK_NAME)
describe:
@aws cloudformation describe-stacks \
--region $(AWS_REGION) \
--stack-name $(AWS_STACK_NAME) \
outputs:
@make describe | jq -r '.Stacks[0].Outputs'
url:
@make describe | jq -r ".Stacks[0].Outputs[0].OutputValue" -j