github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/Makefile (about) 1 # Content managed by Project Forge, see [projectforge.md] for details. 2 .PHONY: clean 3 clean: ## Removes builds and compiled templates 4 @rm -rf tmp/*.hashcode 5 @rm -rf out 6 @find ./queries -type f -name '*.sql.go' -exec rm {} + 7 @find ./views -type f -name '*.html.go' -exec rm {} + 8 9 .PHONY: dev 10 dev: ## Start the project, reloading on changes 11 @bin/dev.sh 12 13 .PHONY: templates 14 templates: 15 @bin/templates.sh 16 17 .PHONY: build 18 build: templates ## Build all binaries 19 @go build -gcflags "all=-N -l" -o build/debug/dbaudit . 20 21 .PHONY: build-release 22 build-release: templates ## Build all binaries without debug information, clean up after 23 @go build -ldflags '-s -w' -trimpath -o build/release/dbaudit . 24 25 .PHONY: lint 26 lint: ## Run linter 27 @bin/check.sh 28 29 .PHONY: help 30 help: 31 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 32 33 .DEFAULT_GOAL := help