-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 850 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
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GODEPS=$(GOCMD) get
#GOTEST=$(GOCMD) test
SERVER_PROGRAM_NAME=mimcas-server
SERVER_BINARY_NAME=bin/$(SERVER_PROGRAM_NAME)
SERVER_SOURCE_NAME=cmd/$(SERVER_PROGRAM_NAME)/main.go
CLI_PROGRAM_NAME=mimcas-cli
CLI_BINARY_NAME=bin/$(CLI_PROGRAM_NAME)
CLI_SOURCE_NAME=cmd/$(CLI_PROGRAM_NAME)/main.go
VERSION=v0.1.0
all: build
build:
CGO_ENABLED=0 $(GOBUILD) -o $(SERVER_BINARY_NAME) -v $(SERVER_SOURCE_NAME)
CGO_ENABLED=0 $(GOBUILD) -o $(CLI_BINARY_NAME) -v $(CLI_SOURCE_NAME)
run: build
./$(SERVER_BINARY_NAME)
clean:
$(GOCLEAN)
rm -f $(SERVER_BINARY_NAME)
fmt:
gofmt -w .
deps:
$(GODEPS) -d ./...
build-docker: build
docker build . -f Dockerfile-server -t pablogcaldito/mimcas-server:$(VERSION)
docker build . -f Dockerfile-cli -t pablogcaldito/mimcas-cli:$(VERSION)