2022-08-14 13:40:02 -06:00
|
|
|
export PATH:=$(shell go env GOPATH)/bin:$(PATH)
|
|
|
|
export EV_DATA=mem:
|
|
|
|
export EV_HTTP=:8080
|
2023-05-29 09:48:20 -06:00
|
|
|
export WEBFINGER_DOMAINS=localhost
|
|
|
|
|
|
|
|
.DEFAULT_GOAL := air
|
|
|
|
|
2022-08-12 15:53:16 -06:00
|
|
|
-include local.mk
|
2022-08-06 09:52:36 -06:00
|
|
|
|
2023-05-29 09:48:20 -06:00
|
|
|
|
2022-08-19 12:26:42 -06:00
|
|
|
air: gen
|
2022-08-14 13:40:02 -06:00
|
|
|
ifeq (, $(shell which air))
|
|
|
|
go install github.com/cosmtrek/air@latest
|
|
|
|
endif
|
2023-01-09 11:30:02 -07:00
|
|
|
air ./cmd/ev
|
2022-08-19 12:26:42 -06:00
|
|
|
|
|
|
|
run:
|
2023-01-09 12:32:45 -07:00
|
|
|
go build ./cmd/ev && ./ev
|
2022-08-19 12:26:42 -06:00
|
|
|
|
2022-08-06 09:52:36 -06:00
|
|
|
test:
|
2022-08-07 11:55:49 -06:00
|
|
|
go test -cover -race ./...
|
|
|
|
|
|
|
|
|
2022-08-19 12:26:42 -06:00
|
|
|
GQLS=gqlgen.yml
|
|
|
|
GQLS:=$(GQLS) $(wildcard api/gql_ev/*.go)
|
|
|
|
GQLS:=$(GQLS) $(wildcard pkg/*/*.graphqls)
|
|
|
|
GQLS:=$(GQLS) $(wildcard app/*/*.graphqls)
|
|
|
|
GQLS:=$(GQLS) $(wildcard app/*/*.go)
|
2022-08-09 16:23:33 -06:00
|
|
|
GQLSRC=internal/graph/generated/generated.go
|
2022-08-07 11:55:49 -06:00
|
|
|
|
2023-01-09 11:30:02 -07:00
|
|
|
clean:
|
|
|
|
rm -f "$(GQLSRC)"
|
2022-08-07 11:55:49 -06:00
|
|
|
gen: gql
|
|
|
|
gql: $(GQLSRC)
|
|
|
|
$(GQLSRC): $(GQLS)
|
2022-08-09 16:23:33 -06:00
|
|
|
ifeq (, $(shell which gqlgen))
|
|
|
|
go install github.com/99designs/gqlgen@latest
|
|
|
|
endif
|
|
|
|
gqlgen
|
|
|
|
|