forked from openconfig/kne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 853 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
MESHNET_DOCKER_IMAGE := hfam/meshnet
GOPATH ?= ${HOME}/go
KNE_CLI_BIN := kne
INSTALL_DIR := /usr/local/bin
COMMIT := $(shell git describe --dirty --always)
TAG := $(shell git describe --tags --abbrev=0 || echo latest)
include .mk/kind.mk
include .mk/lint.mk
include .mk/ocipush.mk
.PHONY: all
all: docker
## Run unit tests
## Ignore all tests under the cloudbuild/ tree as these targets are end-to-end
test:
go test `go list ./... | grep -v /cloudbuild`
## Targets below are for integration testing only
.PHONY: up
## Build test environment
up: kind-start
.PHONY: down
## Destroy test environment
down: kind-stop
.PHONY: build
## Build kne
build:
CGO_ENABLED=0 go build -o $(KNE_CLI_BIN) -ldflags="-s -w" kne_cli/main.go
.PHONY: install
## Install kne cli binary to user's local bin dir
install: build
sudo mv $(KNE_CLI_BIN) $(INSTALL_DIR)