-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
29 lines (20 loc) · 898 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
STACK = ttl-test
VERSION = 0.1
.PHONY: build deploy validate destroy
DOMAINNAME = d.dabase.com
ACMCERTIFICATEARN = arn:aws:acm:ap-southeast-1:407461997746:certificate/87b0fd84-fb44-4782-b7eb-d9c7f8714908
deploy:
sam build
SAM_CLI_TELEMETRY=0 sam deploy --resolve-s3 --stack-name $(STACK) --parameter-overrides DomainName=$(DOMAINNAME) ACMCertificateArn=$(ACMCERTIFICATEARN) --no-confirm-changeset --no-fail-on-empty-changeset --capabilities CAPABILITY_IAM --disable-rollback
build-MainFunction:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-X main.Version=$(VERSION)" -o ${ARTIFACTS_DIR}/bootstrap
validate:
aws cloudformation validate-template --template-body file://template.yml
destroy:
aws cloudformation delete-stack --stack-name $(STACK)
sam-tail-logs:
sam logs --stack-name $(STACK) --tail
clean:
rm -rf main gin-bin
sync:
sam sync --stack-name $(STACK) --watch