go-tools/Makefile

40 lines
686 B
Makefile
Raw Normal View History

2023-07-15 08:35:45 -06:00
export PATH:=$(shell go env GOPATH)/bin:$(PATH)
export EV_DATA=mem:
2023-10-15 08:56:58 -06:00
export EV_HTTP=:8085
2023-07-15 08:35:45 -06:00
export WEBFINGER_DOMAINS=localhost
.DEFAULT_GOAL := air
-include local.mk
air: gen
ifeq (, $(shell which air))
go install github.com/cosmtrek/air@latest
endif
air .
run:
2023-10-15 08:56:58 -06:00
go build -buildvcs=true -o sour.is-tools ./cmd/ev && ./sour.is-tools
2023-07-15 08:35:45 -06:00
test:
go test -cover -race ./...
2023-09-29 10:31:25 -06:00
GQLS=gqlgen.yml
GQLS:=$(GQLS) $(wildcard app/*/*.graphqls)
GQLS:=$(GQLS) $(wildcard app/*/*.go)
GQLSRC=internal/graph/generated/generated.go
clean:
rm -f "$(GQLSRC)"
gen: gql
gql: $(GQLSRC)
$(GQLSRC): $(GQLS)
ifeq (, $(shell which gqlgen))
go install github.com/99designs/gqlgen@latest
endif
gqlgen
2023-07-15 08:35:45 -06:00
clean: