github.com/tunedmystic/hound@v0.0.0-20200829043919-3822fec61e65/Makefile (about)

     1  APP=hound
     2  
     3  help:  ## This help
     4  	@echo "Usage:"
     5  	@echo "  make <target>"
     6  	@echo ""
     7  	@echo "Targets:"
     8  	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[1m%-15s\033[0m %s\n", $$1, $$2}'
     9  
    10  build: clean  ## Build the binary
    11  	@go build -ldflags="-s -w"
    12  
    13  clean:  ## Clean workspace
    14  	@rm -f ${APP}
    15  	@rm -rf tmp
    16  	@rm -rf coverage.txt
    17  
    18  dev:  ## Run the program in dev mode.
    19  	@BASE_DIR=$(shell go env GOMOD) DATABASE_NAME=hound.sqlite go run main.go
    20  
    21  install:  ## Install project dependencies
    22  	@go mod download
    23  
    24  test:  ## Run tests
    25  	@go clean -testcache; BASE_DIR=$(shell go env GOMOD) DATABASE_NAME=hound-test.sqlite go test ./app/... -v -covermode=atomic -coverprofile coverage.txt; go tool cover -func coverage.txt
    26  
    27  .PHONY: help build clean install test dev