-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (30 loc) · 1.31 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
BUILD_TAGS = netgo
PACKAGES=$(shell go list ./dao ./service ./monitor/.)
build_monitor:
ifeq ($(OS),Windows_NT)
CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build $(BUILD_FLAGS) -o build/monitor.exe cmd/mind-marketplace-monitor/main.go
else
CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build $(BUILD_FLAGS) -o build/monitor cmd/mind-marketplace-monitor/main.go
endif
#build_monitor_docker:
# docker build --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} -f monitor.dockerfile -t monitor .
build_server:
ifeq ($(OS),Windows_NT)
CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build $(BUILD_FLAGS) -o build/server.exe cmd/mind-marketplace-server/main.go
else
CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build $(BUILD_FLAGS) -o build/server cmd/mind-marketplace-server/main.go
endif
#build_server_docker:
# docker build --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} -f server.dockerfile -t server .
build: build_server build_monitor
#build_docker: build_server_docker build_monitor_docker
test:
go test -race -v $(PACKAGES)
lint:
golangci-lint cache clean
golangci-lint run
genswagger:
swagger generate server -f ./swagger.yaml -A mind-marketplace --default-scheme=http
genabi:
./script/abigen --abi ./monitor/contracts/marketplace.abi --pkg contracts --out ./monitor/contracts/marketplace.go --type Marketplace
.PHONY: build build_docker test lint genswagger genabi