Skip to content

Commit 21a2fa3

Browse files
committed
chore: makefile添加clean操作
1 parent 3ba4e5c commit 21a2fa3

File tree

11 files changed

+15
-9
lines changed

11 files changed

+15
-9
lines changed

Makefile

+10-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ install: ## Install all dependencies
3333

3434
.PHONY: gen-proto
3535
gen-proto: ## Generate proto files and run protoc plugins
36-
ent-gen-proto -path=./internal/pkg/database/ent/schema
36+
ent-gen-proto -path=./internal/pkg/database/schema
3737
buf generate
3838
protoc-go-inject-tag -input="./api/*/*/*.pb.go" -remove_tag_comment
3939

@@ -49,7 +49,7 @@ gen-ts: gen-docs ## Generate typescript client
4949

5050
.PHONY: gen-ent
5151
gen-ent: ## Generate ent code
52-
go generate ./internal/pkg/database/ent
52+
go generate ./internal/pkg/database
5353

5454
.PHONY: gen-wire
5555
gen-wire: ## Generate wire code
@@ -102,6 +102,14 @@ fmt: ## Run formatter
102102
go fmt ./...
103103
buf format
104104

105+
.PHONY: clean
106+
clean: ## Clean build files
107+
rm -rf ./build
108+
rm -rf ./swagger
109+
rm -rf ./api
110+
rm -rf ./internal/pkg/database/ent
111+
112+
105113
.PHONY: help
106114
help: ## Show this help message
107115
@echo "\n\033[1mSphere build tool.\033[0m Usage: make [target]\n"

internal/pkg/database/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ent

internal/pkg/database/ent/.gitignore

-3
This file was deleted.

internal/pkg/database/ent/generate.go

-3
This file was deleted.

internal/pkg/database/generate.go

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package database
2+
3+
//go:generate go run -mod=mod entgo.io/ent/cmd/ent generate --feature sql/modifier,sql/execquery,sql/upsert,sql/lock --target ./ent ./schema
File renamed without changes.
File renamed without changes.

proto/entpb/entpb.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ syntax = "proto3";
33

44
package entpb;
55

6-
option go_package = "github.com/TBXark/sphere/internal/pkg/database/ent/proto/entpb";
6+
option go_package = "github.com/TBXark/sphere/internal/pkg/database/proto/entpb";
77

88
message Admin {
99
int64 id = 1;

0 commit comments

Comments
 (0)