forked from wundergraph/cosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (29 loc) · 885 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
30
31
32
33
34
35
36
37
38
39
40
.PHONY: build
bump-router:
go get github.com/wundergraph/cosmo/router@upgrade
go mod tidy
cd .. && go work sync
VERSION?=dev
build:
CGO_ENABLED=0 go build -trimpath -ldflags "-extldflags -static -X github.com/wundergraph/cosmo/aws-lambda-router/internal.Version=$(VERSION)" -a -o bootstrap cmd/main.go
build-sam:
rm -rf .aws-sam && sam build --parallel && cp router.json .aws-sam/build/Api/router.json
dev: build-sam
sam local start-api -p 3003 --shutdown
deploy: build-sam
sam deploy
lint:
cd adapter && go vet ./...
cd adapter && staticcheck ./...
test:
go test -v ./...
fetch-router-config:
wgc router fetch mygraph --namespace default -o router.json
sync:
sam sync --watch
create-lambda-zip: build fetch-router-config
zip -r lambda.zip bootstrap router.json
bump-deps:
go get github.com/wundergraph/cosmo/router@upgrade
go mod tidy
cd .. && go work sync