2021-12-31 07:09:52 -08:00
|
|
|
# Install Ent code-generation module
|
|
|
|
.PHONY: ent-install
|
|
|
|
ent-install:
|
|
|
|
go get -d entgo.io/ent/cmd/ent
|
|
|
|
|
|
|
|
# Generate Ent code
|
2021-12-11 10:46:01 -08:00
|
|
|
.PHONY: ent-gen
|
|
|
|
ent-gen:
|
|
|
|
go generate ./ent
|
|
|
|
|
2021-12-31 07:09:52 -08:00
|
|
|
# Create a new Ent entity
|
2021-12-11 10:46:01 -08:00
|
|
|
.PHONY: ent-new
|
|
|
|
ent-new:
|
2023-02-23 00:35:33 -08:00
|
|
|
go run entgo.io/ent/cmd/ent new $(name)
|
2021-12-11 10:46:01 -08:00
|
|
|
|
2021-12-31 07:09:52 -08:00
|
|
|
# Run the application
|
2021-12-11 11:00:10 -08:00
|
|
|
.PHONY: run
|
|
|
|
run:
|
2021-12-11 13:06:28 -08:00
|
|
|
clear
|
2022-11-02 16:23:26 -07:00
|
|
|
go run cmd/web/main.go
|
2021-12-17 16:58:44 -08:00
|
|
|
|
2021-12-31 07:09:52 -08:00
|
|
|
# Run all tests
|
2021-12-17 16:58:44 -08:00
|
|
|
.PHONY: test
|
2021-12-17 18:14:43 -08:00
|
|
|
test:
|
2022-05-17 05:45:18 -07:00
|
|
|
go test -count=1 -p 1 ./...
|
2022-02-08 05:58:22 -08:00
|
|
|
|
2022-02-10 05:21:07 -08:00
|
|
|
# Check for direct dependency updates
|
|
|
|
.PHONY: check-updates
|
|
|
|
check-updates:
|
2022-05-17 05:45:18 -07:00
|
|
|
go list -u -m -f '{{if not .Indirect}}{{.}}{{end}}' all | grep "\["
|