forked from kube-compose/kube-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 787 Bytes
/
Makefile
File metadata and controls
43 lines (34 loc) · 787 Bytes
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
42
43
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GOMOD=$(GOCMD) mod
BINARY_NAME=kube-compose
SYSTEMS=darwin linux windows
all: build tests
build:
$(GOBUILD) -o $(BINARY_NAME) -v
tests:
$(GOTEST) -v ./...
clean:
$(GOCLEAN)
rm -rf release
run:
$(GOBUILD) -o $(BINARY_NAME) -v ./...
./$(BINARY_NAME)
deps:
$(GOGET) github.com/stretchr/testify
$(GOGET) github.com/urfave/cli
modules:
$(GOMOD) tidy
${GOMOD} download
releases:
$(foreach SYSTEM, $(SYSTEMS), \
mkdir -p release/$(SYSTEM); \
CGO_ENABLED=0 GOOS=$(SYSTEM) GOARCH=amd64 $(GOBUILD) -o release/$(SYSTEM)/$(BINARY_NAME).$(SYSTEM); \
cd release/$(SYSTEM)/; \
tar -zcvf $(BINARY_NAME).$(SYSTEM).tar.gz $(BINARY_NAME).$(SYSTEM); \
cd ../../; \
)