forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 950 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
# Makefile
all: deps test build-modules build
.PHONY: deps test build-modules build image
# deps will clean out the vendor directory and use go mod for a fresh install
deps:
GOPROXY="https://proxy.golang.org" go mod vendor -v && go mod tidy -v
# test will ensure that all of our dependencies are available and run validate.sh
test: deps
# If there is no indentation, Make will treat it as a directive for itself; otherwise, it's regarded as a shell script.
# https://stackoverflow.com/a/4483467
ifeq "$(adapter)" ""
./validate.sh
else
go test github.com/prebid/prebid-server/adapters/$(adapter) -bench=.
endif
# build-modules generates modules/builder.go file which provides a list of all available modules
build-modules:
go generate modules/modules.go
# 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:
docker build -t prebid-server .