-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (31 loc) · 1.07 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
# Create base for installing binaries
BIN = $(CURDIR)/bin
$(BIN):
@mkdir -p $@
$(BIN)/golangci-lint: | $(BIN)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.24.0
$(BIN)/gopherbadger: | $(BIN)
GOBIN=$(BIN) go get github.com/jpoles1/gopherbadger
$(BIN)/goreleaser: | $(BIN)
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
# Binaries to install
GOLANGCI-LINT = $(BIN)/golangci-lint
GOPHERBADGER = $(BIN)/gopherbadger
GORELEASER = $(BIN)/goreleaser
###############################################################################
###############################################################################
###############################################################################
all: clean static unit build
# Build binaries
build: | $(GORELEASER)
$(GORELEASER) build --rm-dist --skip-validate
clean:
rm -r bin/
rm -r dist/
static: | $(GOLANGCI-LINT) $(GOPHERBADGER)
$(GOLANGCI-LINT) run ./... --fix
$(GOPHERBADGER) -md="README.md"
unit:
go test ./... -cover
releases:
$(GORELEASER) release