This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
59 lines (48 loc) · 1.57 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
47
48
49
50
51
52
53
54
55
56
57
58
59
REPO=blacktop
NAME=graboid
CUR_VERSION=$(shell svu current)
NEXT_VERSION=$(shell svu patch)
.PHONY: setup
setup: ## Install all the build and lint dependencies
@echo "===> Installing deps"
go get -u github.com/alecthomas/gometalinter
go install github.com/goreleaser/goreleaser
go get -u github.com/pierrre/gotestcover
go get -u github.com/spf13/cobra
go get -u golang.org/x/tools/cmd/cover
go get -u github.com/caarlos0/svu
gometalinter --install
.PHONY: update_mod
update_mod:
rm go.sum
go mod download
go mod tidy
.PHONY: dry_release
dry_release:
@echo " > Creating Pre-release Build ${NEXT_VERSION}"
@goreleaser build --rm-dist --skip-validate
.PHONY: release
release: ## Create a new release from the NEXT_VERSION
@echo " > Creating Release ${NEXT_VERSION}"
@.hack/make/release ${NEXT_VERSION}
@goreleaser --rm-dist
.PHONY: release-minor
release-minor: ## Create a new minor semver release
@echo " > Creating Release $(shell svu minor)"
@.hack/make/release $(shell svu minor)
@goreleaser --rm-dist
destroy: ## Remove release from the CUR_VERSION
@echo " > Deleting Release ${CUR_VERSION}"
rm -rf dist
git tag -d ${CUR_VERSION}
git push origin :refs/tags/${CUR_VERSION}
build: ## Build a beta version of malice
@echo "===> Building Binaries"
go build -mod=vendor
clean: ## Clean up artifacts
rm *.tar
rm -rf dist
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help