forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 940 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
# Makefile
all:
@echo ""
@echo " deps: grab dependencies using go modules"
@echo " test: test prebid-server (via validate.sh)"
@echo " build: build prebid-server"
@echo " image: build docker image"
@echo ""
.PHONY: install deps test build image
# deps will clean out the vendor directory and use go mod for a fresh install
deps:
rm -rf vendor
go mod vendor
go mod tidy
# test will ensure that all of our dependencies are available and run validate.sh
test: deps
./validate.sh
# TODO: when adapters are in their own packages we can enable adapter-specific testing by passing the "adapter" argument
#ifeq ($(adapter),"all")
# ./validate.sh
#else
# go test github.com/prebid/prebid-server/adapters/$(adapter) -bench=.
#endif
# build will ensure all of our tests pass and then build the go binary
build: test
go build -mod=vendor ./...
# image will build a docker image
image: build
docker build -t prebid-server .