-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
24 lines (19 loc) · 1.24 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
export
# HELP =================================================================================================================
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
# Phony avoids conflicts for the file named as the main command
.PHONY: help
# Adds files to staging the commits the changes and finally push to remote repository
help: ## Display this help screen
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
gitPush: ### Command to aid in pushing code to the current branch. Runs `git add . && git commit && git push
chmod +x ./cmd/gitPush.sh
./cmd/gitPush.sh
.PHONY: gitPush
mockeryGenerateTests: ### generates testing mocks using mockery tool
mockery --dir=internal/entity/utilities --name=PaymentUsecase --filename=payment.go --output=internal/entity/mocks --outpkg=mocks
.PHONY: mockeryGenerateTests
testCover: ### Used to run tests with coverage and display the output.Scans all the files and runs the tests if available
go test ./... -coverprofile=cover.out
.PHONY: goTestCoverProfile