github.com/prebid/prebid-server/v2@v2.18.0/Makefile (about) 1 # Makefile 2 3 all: deps test build-modules build 4 5 .PHONY: deps test build-modules build image format 6 7 # deps will clean out the vendor directory and use go mod for a fresh install 8 deps: 9 GOPROXY="https://proxy.golang.org" go mod vendor -v && go mod tidy -v 10 11 # test will ensure that all of our dependencies are available and run validate.sh 12 test: deps 13 # If there is no indentation, Make will treat it as a directive for itself; otherwise, it's regarded as a shell script. 14 # https://stackoverflow.com/a/4483467 15 ifeq "$(adapter)" "" 16 ./validate.sh 17 else 18 go test github.com/prebid/prebid-server/v2/adapters/$(adapter) -bench=. 19 endif 20 21 # build-modules generates modules/builder.go file which provides a list of all available modules 22 build-modules: 23 go generate modules/modules.go 24 25 # build will ensure all of our tests pass and then build the go binary 26 build: test 27 go build -mod=vendor ./... 28 29 # image will build a docker image 30 image: 31 docker build -t prebid-server . 32 33 # format runs format 34 format: 35 ./scripts/format.sh -f true 36 37 # formatcheck runs format for diagnostics, without modifying the code 38 formatcheck: 39 ./scripts/format.sh -f false