Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ent to latest version #444

Merged
merged 2 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updates:
versions:
- 1.36.0
- 1.36.1
- dependency-name: github.com/facebook/ent
- dependency-name: entgo.io/ent
versions:
- 0.5.4
- 0.6.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
go-version: ['1.15', '1.16', '1.17', '1.18']
go-version: ['1.18', '1.19']
os: [ubuntu-latest]

services:
Expand Down
2 changes: 1 addition & 1 deletion cmd/gobay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ gobay new github.com/shanbay/my_proj
- openapi 工具: [oapi-codegen](https://github.com/shanbay/oapi-codegen/releases)
- grpc/protobuf 工具: [grpc-go](https://github.com/grpc/grpc-go) [protobuf](https://github.com/golang/protobuf)
- lint 工具: [golangci-lint](https://github.com/golangci/golangci-lint#binary)
- orm 代码生成(ent): [ent](https://github.com/shanbay/ent) 请安装这个版本的 entc `go get github.com/facebook/ent/cmd/entc@v0.4.0`
- orm 代码生成(ent): [ent](https://github.com/shanbay/ent) 请安装这个版本的 entc `go install entgo.io/ent/cmd/ent@latest`
- gocovmerge: [gocovmerge](https://github.com/wadey/gocovmerge)
- pre-commit: [pre-commit](https://pre-commit.com/#installation)
- gotests: [gotests](https://github.com/cweill/gotests)
Expand Down
6 changes: 3 additions & 3 deletions cmd/gobay/templates/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ $(EMPTY_SCHEMA_PATH): $(DIR_SCHEMA_GEN)
echo "package entschema" > $(EMPTY_SCHEMA_PATH)

entinit:
entc init --target $(DIR_SCHEMA) $(ARGS)
ent init --target $(DIR_SCHEMA) $(ARGS)

entgen: $(EMPTY_SCHEMA_PATH)
entc generate --target $(DIR_SCHEMA_GEN) --template $(DIR_SCHEMA_TMPL) $(DIR_SCHEMA)
ent generate --target $(DIR_SCHEMA_GEN) --template $(DIR_SCHEMA_TMPL) $(DIR_SCHEMA)

entdesc:
entc describe $(DIR_SCHEMA)
ent describe $(DIR_SCHEMA)
2 changes: 1 addition & 1 deletion cmd/gobay/templates/app/extensions.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
// "context"
// schema "{{ $.Url }}/gen/entschema"
// "github.com/facebook/ent/dialect"
// "entgo.io/ent/dialect"
// "github.com/go-redis/redis"
_ "github.com/go-sql-driver/mysql"
"github.com/shanbay/gobay"
Expand Down
2 changes: 1 addition & 1 deletion cmd/gobay/templates/dockerfiles/Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV GO111MODULE=on
RUN go get github.com/shanbay/gobay/cmd/gobay

# ent orm
RUN go get github.com/facebook/ent/cmd/entc@v0.4.0
RUN go install entgo.io/ent/cmd/ent@latest

# grpc
RUN apt-get install protobuf-compiler -y
Expand Down
6 changes: 3 additions & 3 deletions cmd/gobay/templates/go.mod.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module {{ $.Url }}

go 1.14
go 1.18

require (
github.com/facebook/ent v0.4.3
entgo.io/ent v0.11.7
github.com/deepmap/oapi-codegen v1.8.2
)

replace github.com/facebook/ent => github.com/shanbay/ent v0.4.3
replace entgo.io/ent => github.com/shanbay/ent v0.11.7
Loading