-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (25 loc) · 850 Bytes
/
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
.PHONY: clean
clean: ## Removes builds and compiled templates
@rm -rf tmp/*.hashcode
@rm -rf out
@find ./queries -type f -name '*.sql.go' -exec rm {} +
@find ./views -type f -name '*.html.go' -exec rm {} +
.PHONY: dev
dev: ## Start the project, reloading on changes
@bin/dev.sh
.PHONY: templates
templates:
@bin/templates.sh
.PHONY: build
build: templates ## Build all binaries
@go build -gcflags "all=-N -l" -o build/debug/admini .
.PHONY: build-release
build-release: templates ## Build all binaries without debug information, clean up after
@go build -ldflags '-s -w' -trimpath -o build/release/admini .
.PHONY: lint
lint: ## Run linter
@bin/check.sh
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help