forked from prebid/prebid-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (20 loc) · 764 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
all:
@echo ""
@echo " init: Install glide dependencies. Assumes go and glide are installed already."
@echo " test: Run the unit tests and code style validation"
@echo " build: Build a linux binary which runs prebid-cache"
@echo " image: Build a docker which runs prebid-cache"
@echo ""
.PHONY: init test build image
init:
glide install
# Validates the code for style and unit tests
test:
./validate.sh --nofmt
# Run the tests and make a linux binary for the app. For details about this strategy,
# see https://blog.codeship.com/building-minimal-docker-containers-for-go-applications/
build: test
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
# Build a docker image which runs the binary
image: build
docker build -t prebid-cache .