-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
38 lines (28 loc) · 982 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SCHEMA_DIR=./spec/schema
##################################
####### Setup ########
##################################
.PHONY: setup
setup:
@go mod download
##################################
####### Tool ########
##################################
.PHONY: fmt lint clean
fmt:
@gofumpt -w .
@gofmt -d -w -e .
lint:
@golangci-lint run ./...
clean:
@git clean -fdx ${COVERAGE_FILE}
migrations:
@go run -mod=mod entgo.io/ent/cmd/ent generate --feature sql/upsert --target gen/entschema ${SCHEMA_DIR}
self_test:
go build .
rm factories/testfactory/testfactory.go
./ent-factory generate --schemaPath gen/entschema --outputPath factories --projectPath github.com/zaihui/ent-factory --overwrite=true --genImportFields=true
rm ent-factory
all_factory:
@go install github.com/zaihui/ent-factory@latest
ent-factory generate --schemaPath gen/entschema --outputPath factories --projectPath github.com/zaihui/ent-factory --factoriesPath factories