-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
66 lines (54 loc) · 1.18 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
PACKAGES := $(shell go list ./...)
all: help
.PHONY: help
help: Makefile
@echo
@echo " Choose a make command to run"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
## init: Provision infrastructure
.PHONY: init
init:
./scripts/init.sh
## deploy: Build code into a container and deploy it to AppRunner
.PHONY: deploy
deploy:
./scripts/deploy.sh
## destroy: Tears down infrastructure
.PHONY: destroy
destroy:
./scripts/destroy.sh
## vet: vet code
.PHONY: vet
vet:
go vet $(PACKAGES)
## test: run unit tests
.PHONY: test
test:
go test -race -cover $(PACKAGES)
## devfrontend: iterate on frontend next.js app
.PHONY: devfrontend
devfrontend:
cd nextjs && npm run dev
## frontend: build frontend next.js app
.PHONY: frontend
frontend:
cd nextjs && npm run export
## build: build a binary (backend is dependent upon frontend)
.PHONY: build
build: test frontend
go build -o ./app -v
## start: build and run local project
.PHONY: start
start: build
clear
@echo ""
DYNAMO_TABLE=apprunner-multiregion ./app
## devbackend: compile and run go backend
.PHONY: devbackend
devbackend: test
go build -o ./app -v
clear
@echo ""
DYNAMO_TABLE=apprunner-multiregion ./app