-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
47 lines (30 loc) · 1.09 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
.PHONY: license tests
build: ## Build the binary file
@echo "Building the binary file"
go build -ldflags="-X 'github.com/karl-cardenas-coding/mywhoop/cmd.VersionString=1.0.0'" -o=whoop -v
license:
@echo "Applying license headers..."
copywrite headers
opensource:
@echo "Checking for open source licenses"
~/go/bin/go-licenses report github.com/karl-cardenas-coding/mywhoop --template=docs/open-source.tpl > docs/open-source.md
tests: ## Run tests
@echo "Running tests"
go test -race -shuffle on ./...
tests-coverage: ## Start Go Test with code coverage
@echo "Running Go Tests with code coverage"
go test -v -race -shuffle on -cover -coverprofile=coverage.out -covermode=atomic ./...
view-coverage: ## View the code coverage
@echo "Viewing the code coverage"
go tool cover -html=coverage.out
nil: ## Check for nil errors
@echo "Checking for nil errors"
~/go/bin/nilaway ./...
## Cleaning
clean: ## Clean the binary file
@echo "Cleaning the binary file"
rm -rf dist/
rm mywhoop_* || true
## Release
release-preview: # Create a preview release
goreleaser release --snapshot --clean