-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (36 loc) · 1.23 KB
/
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
42
43
44
45
46
######################### //S/M Makefile #########################
#
# This Makefile is used to manage the //S/M Go Libs
# All it includes for now is testing, as nothing is being packaged
#
# Parts of this makefile are based upon github.com/kolide/kit
#
NAME := libs
REPO := seibert-media
GIT_HOST := github.com
REGISTRY := quay.io
IMAGE := seibertmedia/$(NAME)
PATH := $(GOPATH)/bin:$(PATH)
VERSION = $(shell git describe --tags --always --dirty)
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
REVISION = $(shell git rev-parse HEAD)
REVSHORT = $(shell git rev-parse --short HEAD)
USER = $(shell whoami)
include helpers/make_version
include helpers/make_gohelpers
### MAIN STEPS ###
default: test
# install required tools and dependencies
deps:
go get -u golang.org/x/tools/cmd/goimports
go get -u github.com/golang/lint/golint
go get -u github.com/kisielk/errcheck
go get -u github.com/golang/dep/cmd/dep
dep ensure
# test entire repo
test:
@go test -cover -race $(shell go list ./... | grep -v /vendor/)
cover:
go get github.com/haya14busa/goverage
go get github.com/schrej/godacov
goverage -v -coverprofile=coverage.out $(shell go list ./... | grep -v /vendor/)