2024-10-24 18:08:43 +00:00
|
|
|
.PHONY: build test clean dev-init dev-reinit
|
2024-10-19 04:16:17 +00:00
|
|
|
|
2024-06-20 03:03:11 +00:00
|
|
|
build: clean
|
2024-10-19 04:16:17 +00:00
|
|
|
@echo "======================== Building Binary ======================="
|
|
|
|
CGO_ENABLED=0 go build -ldflags="-s -w" -v -o dist/ .
|
2024-06-20 03:03:11 +00:00
|
|
|
|
2024-10-24 18:08:43 +00:00
|
|
|
test: dev-reinit
|
2024-10-19 04:16:17 +00:00
|
|
|
@echo "======================== Running Tests ========================="
|
|
|
|
go test -v -cover -coverpkg=./app/ -coverprofile coverage ./test/
|
|
|
|
@echo "======================= Coverage Report ========================"
|
|
|
|
go tool cover -func=coverage
|
|
|
|
@rm -f coverage
|
2024-06-20 03:03:11 +00:00
|
|
|
|
|
|
|
clean:
|
2024-10-19 04:16:17 +00:00
|
|
|
@echo "======================== Cleaning Project ======================"
|
2024-06-20 03:03:11 +00:00
|
|
|
go clean
|
2024-10-19 04:16:17 +00:00
|
|
|
rm -f dist/*
|
|
|
|
|
|
|
|
dev-init:
|
|
|
|
@cd scripts; make dev-init
|
|
|
|
|
|
|
|
dev-reinit:
|
|
|
|
@cd scripts; make dev-reinit
|