-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
66 lines (51 loc) · 1.88 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
60
61
62
63
64
65
66
REPO=blacktop
NAME=lporg
CUR_VERSION=$(shell svu current)
NEXT_VERSION=$(shell svu patch)
.PHONY: test
test: ## Run all the tests
@.hack/scripts/reset.sh
@go run *.go load launchpad.yaml
# gotestcover $(TEST_OPTIONS) -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=30s
test.save: ## Run all the tests
@test -f launchpad.db || scripts/copy.sh
@go run *.go save
test.default: ## Run the default test
@.hack/scripts/reset.sh
@go run *.go default
test.verbose: ## Run all the tests
@.hack/scripts/reset.sh
@go run *.go -V load launchpad.yaml
cover: test ## Run all the tests and opens the coverage report
go tool cover -html=coverage.txt
build: ## Build a beta version of malice
@echo "===> Building Binaries"
go build
.PHONY: dry_release
dry_release: ## Run goreleaser without releasing/pushing artifacts to github
@echo " > Creating Pre-release Build ${NEXT_VERSION}"
@goreleaser build --id darwin --clean --timeout 60m --snapshot --single-target --output dist/lporg
.PHONY: snapshot
snapshot: ## Run goreleaser snapshot
@echo " > Creating Snapshot ${NEXT_VERSION}"
@goreleaser --clean --snapshot
.PHONY: release
release: ## Create a new release from the NEXT_VERSION
@echo " > Creating Release ${NEXT_VERSION}"
@.hack/make/release ${NEXT_VERSION}
@goreleaser --clean
.PHONY: destroy
destroy: ## Remove release for the CUR_VERSION
@echo " > Deleting Release"
git tag -d ${CUR_VERSION}
git push origin :refs/tags/${CUR_VERSION}
ci: lint test ## Run all the tests and code checks
clean: ## Clean up artifacts
@.hack/scripts/reset.sh
@rm -rf dist/ || true
@rm launchpad.db || true
@rm lporg || true
# 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