saasitone/Makefile

31 lines
541 B
Makefile
Raw Normal View History

# 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
# 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
# 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
# Run all tests
.PHONY: test
2021-12-17 18:14:43 -08:00
test:
go test -count=1 -p 1 ./...
# Check for direct dependency updates
.PHONY: check-updates
check-updates:
go list -u -m -f '{{if not .Indirect}}{{.}}{{end}}' all | grep "\["