Skip to content

Commit 91d8d71

Browse files
committed
Merge branch 'master' of https://github.com/gogf/gf
2 parents d1bbadc + 9d1c6f2 commit 91d8d71

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

cmd/gf/internal/cmd/cmd_init.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,22 @@ func (c cInit) Index(ctx context.Context, in cInitInput) (out *cInitOutput, err
9494
// Update the GoFrame version.
9595
if in.Update {
9696
mlog.Print("update goframe...")
97+
// go get -u github.com/gogf/gf/v2@latest
9798
updateCommand := `go get -u github.com/gogf/gf/v2@latest`
9899
if in.Name != "." {
99100
updateCommand = fmt.Sprintf(`cd %s && %s`, in.Name, updateCommand)
100101
}
101102
if err = gproc.ShellRun(ctx, updateCommand); err != nil {
102103
mlog.Fatal(err)
103104
}
105+
// go mod tidy
106+
gomModTidyCommand := `go mod tidy`
107+
if in.Name != "." {
108+
gomModTidyCommand = fmt.Sprintf(`cd %s && %s`, in.Name, gomModTidyCommand)
109+
}
110+
if err = gproc.ShellRun(ctx, gomModTidyCommand); err != nil {
111+
mlog.Fatal(err)
112+
}
104113
}
105114

106115
mlog.Print("initialization done! ")

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package gf
22

3-
const VERSION = "v2.1.2"
3+
const VERSION = "v2.1.3"
44
const AUTHORS = "john<john@goframe.org>"

0 commit comments

Comments
 (0)