go scratch code for atproto
1
2SHELL = /bin/bash
3.SHELLFLAGS = -o pipefail -c
4
5.PHONY: help
6help: ## Print info about all commands
7 @echo "Commands:"
8 @echo
9 @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
10
11.PHONY: build
12build: ## Build all executables
13 go build ./cmd/handlr
14 go build ./cmd/lexidex
15
16.PHONY: all
17all: build
18
19.PHONY: test
20test: ## Run tests
21 go test ./...
22
23.PHONY: coverage-html
24coverage-html: ## Generate test coverage report and open in browser
25 go test ./... -coverpkg=./... -coverprofile=test-coverage.out
26 go tool cover -html=test-coverage.out
27
28.PHONY: lint
29lint: ## Verify code style and run static checks
30 go vet ./...
31 test -z $(gofmt -l ./...)
32
33.PHONY: fmt
34fmt: ## Run syntax re-formatting (modify in place)
35 go fmt ./...
36
37.PHONY: check
38check: ## Compile everything, checking syntax (does not output binaries)
39 go build ./...
40
41.env:
42 if [ ! -f ".env" ]; then cp example.dev.env .env; fi