This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
generated from mrz1836/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
54 lines (43 loc) · 1.59 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
# Set the custom build tags
GO_BUILD_TAGS=json1
# Common makefile commands & variables between projects
include .make/common.mk
# Common Golang makefile commands & variables between projects
include .make/go.mk
## Not defined? Use default repo name which is the application
ifeq ($(REPO_NAME),)
REPO_NAME="bux"
endif
## Not defined? Use default repo owner
ifeq ($(REPO_OWNER),)
REPO_OWNER="BuxOrg"
endif
.PHONY: all
all: ## Runs multiple commands
@$(MAKE) test-all-db
.PHONY: clean
clean: ## Remove previous builds and any cached data
@echo "cleaning local cache..."
@go clean -cache -testcache -i -r
@$(MAKE) clean-mods
@test $(DISTRIBUTIONS_DIR)
@if [ -d $(DISTRIBUTIONS_DIR) ]; then rm -r $(DISTRIBUTIONS_DIR); fi
.PHONY: install-all-contributors
install-all-contributors: ## Installs all contributors locally
@echo "installing all-contributors cli tool..."
@yarn global add all-contributors-cli
.PHONY: release
release:: ## Runs common.release then runs godocs
@$(MAKE) godocs
.PHONY: test-all-db
test-all-db: ## Runs all tests including embedded database tests
@echo "running all tests including embedded database tests..."
@go test ./... -v -tags="$(GO_BUILD_TAGS) database_tests"
.PHONY: test-all-db-ci
test-all-db-ci: ## Runs all tests including embedded database tests (CI)
@echo "running all tests including embedded database tests..."
@go test ./... -coverprofile=coverage.txt -covermode=atomic -tags="$(GO_BUILD_TAGS) database_tests"
.PHONE: update-contributors
update-contributors: ## Regenerates the contributors html/list
@echo "generating contributor html..."
@all-contributors generate