Skip to content

Commit 7d41185

Browse files
committed
Add Makefile
1 parent c3396f3 commit 7d41185

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
INFO_COLOR=\033[1;34m
2+
RESET=\033[0m
3+
BOLD=\033[1m
4+
TEST ?= $(shell go list ./... | grep -v vendor)
5+
VERSION = $(shell cat VERSION)
6+
REVISION = $(shell git describe --always)
7+
GO ?= CGO_ENABLED=0 GO111MODULE=on go
8+
9+
default: build
10+
ci: depsdev test vet lint
11+
12+
depsdev: ## Installing dependencies for development
13+
$(GO) get golang.org/x/lint/golint
14+
$(GO) get -u github.com/tcnksm/ghr
15+
16+
build: ## Build as linux binary
17+
@echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Building$(RESET)"
18+
$(GO) build -o cclogconv cmd/cclogconv/main.go
19+
20+
test: ## Run test
21+
@echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Testing$(RESET)"
22+
$(GO) test -cover -v $(TEST) -timeout=30s -parallel=4
23+
$(GO) test $(TEST)
24+
25+
vet: ## Exec go vet
26+
@echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Vetting$(RESET)"
27+
$(GO) vet $(TEST)
28+
29+
lint: ## Exec golint
30+
@echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Linting$(RESET)"
31+
golint -set_exit_status $(TEST)
32+
33+
clean:
34+
-rm cclogconv
35+
36+
.PHONY: default test
37+

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.3.9

0 commit comments

Comments
 (0)