forked from tchen0123/supergiant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (24 loc) · 771 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
DOCKER_IMAGE_NAME := supergiant/supergiant
DOCKER_IMAGE_TAG := $(shell git describe --tags --always | tr -d v || echo 'latest')
.PHONY: build test push release
fmt: gofmt goimports
gofmt:
@FLAGS="-w" build/gofmt.sh
goimports:
@FLAGS="-w -local github.com/supergiant/supergiant" build/goimports.sh
lint:
# TODO: enable the test directory when e2e tests will be updated
build/gometalinter.sh
get-tools:
go get -u github.com/kardianos/govendor
go get -u github.com/alecthomas/gometalinter
gometalinter --install
build-image:
docker build -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) .
docker build -t $(DOCKER_IMAGE_NAME):latest .
test:
go test ./pkg/...
build: build-image
push:
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
release: build push