-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (30 loc) · 699 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
37
38
39
40
41
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GOFMT=$(GOCMD)fmt
MAIN= cmd/main.go
BINARY_NAME=fuego-cache
all: test build
build:
$(GOBUILD) -o $(BINARY_NAME) -v $(MAIN)
test:
$(GOTEST) -v ./...
run:
$(GOBUILD) -o $(BINARY_NAME) -v $(MAIN)
./$(BINARY_NAME)
fmt:
$(GOFMT) -w .
# Cross compilation
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME) -v
docker-build-cli:
@docker build -t fuego-cache-cli .
docker-build-http:
@docker build -t fuego-cache-http .
docker-run-cli:
@docker run -it -p 9919:9919 fuego-cache-cli
docker-run-http:
@docker run -d -p 9999:9999 fuego-cache-http