-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
40 lines (27 loc) · 1.15 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
.PHONY: license tests
aws-regions:
aws ec2 describe-regions --region us-east-1 --all-regions --query "Regions[].RegionName" --output text > cmd/aws-regions.txt
license:
@echo "Applying license headers..."
copywrite headers
opensource:
@echo "Checking for open source licenses"
~/go/bin/go-licenses report github.com/karl-cardenas-coding/go-lambda-cleanup/v2 --template=documentation/open-source.tpl > documentation/open-source.md
lint: ## Start Go Linter
@echo "Running Go Linter"
golangci-lint run ./...
build: ## Build the binary file
@echo "Building lambda function and adding version number 1.0.0"
go build -ldflags="-X 'github.com/karl-cardenas-coding/go-lambda-cleanup/v2/cmd.VersionString=1.0.0'" -o=glc -v
tests: ## Run tests
@echo "Running tests"
go test -race ./...
tests-coverage: ## Start Go Test with code coverage
@echo "Running Go Tests with code coverage"
go test -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 ./...