-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (26 loc) · 884 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
ifndef GOPATH
GOPATH := $(HOME)/go
endif
ifndef GOOS
GOOS := linux
endif
ifndef GO111MODULE
GO111MODULE := on
endif
all: build
build: api-server worker
worker:
GOOS=$(GOOS) GO111MODULE=$(GO111MODULE) go build -o bin/filer-gateway-worker internal/worker/main.go
api-server:
GOOS=$(GOOS) GO111MODULE=$(GO111MODULE) go build -o bin/filer-gateway-api internal/api-server/main.go
swagger:
swagger validate pkg/swagger/swagger.yaml
go generate github.com/dccn-tg/filer-gateway/internal/api-server github.com/dccn-tg/filer-gateway/pkg/swagger
doc: swagger
swagger serve pkg/swagger/swagger.yaml
test_worker: build
GOOS=$(GOOS) GO111MODULE=$(GO111MODULE) go test -v github.com/dccn-tg/filer-gateway/internal/worker/...
test_api-server: build
GOOS=$(GOOS) GO111MODULE=$(GO111MODULE) go test -v github.com/dccn-tg/filer-gateway/internal/api-server/...
clean:
rm -rf bin