Skip to content

Commit

Permalink
chore: makefile添加clean操作
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Jan 2, 2025
1 parent 3ba4e5c commit 21a2fa3
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 9 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ install: ## Install all dependencies

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

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

.PHONY: gen-ent
gen-ent: ## Generate ent code
go generate ./internal/pkg/database/ent
go generate ./internal/pkg/database

.PHONY: gen-wire
gen-wire: ## Generate wire code
Expand Down Expand Up @@ -102,6 +102,14 @@ fmt: ## Run formatter
go fmt ./...
buf format

.PHONY: clean
clean: ## Clean build files
rm -rf ./build
rm -rf ./swagger
rm -rf ./api
rm -rf ./internal/pkg/database/ent


.PHONY: help
help: ## Show this help message
@echo "\n\033[1mSphere build tool.\033[0m Usage: make [target]\n"
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/database/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ent
3 changes: 0 additions & 3 deletions internal/pkg/database/ent/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions internal/pkg/database/ent/generate.go

This file was deleted.

3 changes: 3 additions & 0 deletions internal/pkg/database/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package database

//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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion proto/entpb/entpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto3";

package entpb;

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

message Admin {
int64 id = 1;
Expand Down

0 comments on commit 21a2fa3

Please sign in to comment.