Merge pull request #741 from flycash/updateMd

update beego version
This commit is contained in:
Ming Deng 2020-11-26 13:54:05 +08:00 committed by GitHub
commit 1653a01eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 8 deletions

View File

@ -38,7 +38,7 @@ var CmdApiapp = &commands.Command{
now default supoort generate a go modules project. now default supoort generate a go modules project.
{{"Example:"|bold}} {{"Example:"|bold}}
$ bee api [appname] [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-gopath=false] [-beego=v1.12.1] $ bee api [appname] [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-gopath=false] [-beego=v1.12.3]
If 'conn' argument is empty, the command will generate an example API application. Otherwise the command If 'conn' argument is empty, the command will generate an example API application. Otherwise the command
will connect to your database and generate models based on the existing tables. will connect to your database and generate models based on the existing tables.
@ -586,7 +586,7 @@ func createAPI(cmd *commands.Command, args []string) int {
appPath = path.Join(utils.GetBeeWorkPath(), args[0]) appPath = path.Join(utils.GetBeeWorkPath(), args[0])
packPath = args[0] packPath = args[0]
if beegoVersion.String() == `` { if beegoVersion.String() == `` {
beegoVersion.Set(`v1.12.1`) beegoVersion.Set(utils.BEEGO_VERSION)
} }
} }

View File

@ -25,7 +25,7 @@ var CmdHproseapp = &commands.Command{
{{"To scaffold out your application, use:"|bold}} {{"To scaffold out your application, use:"|bold}}
$ bee hprose [appname] [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-gopath=false] [-beego=v1.12.1] $ bee hprose [appname] [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-gopath=false] [-beego=v1.12.3]
If 'conn' is empty, the command will generate a sample application. Otherwise the command If 'conn' is empty, the command will generate a sample application. Otherwise the command
will connect to your database and generate models based on the existing tables. will connect to your database and generate models based on the existing tables.
@ -93,7 +93,7 @@ func createhprose(cmd *commands.Command, args []string) int {
apppath = path.Join(utils.GetBeeWorkPath(), args[0]) apppath = path.Join(utils.GetBeeWorkPath(), args[0])
packpath = args[0] packpath = args[0]
if beegoVersion.String() == `` { if beegoVersion.String() == `` {
beegoVersion.Set(`v1.12.1`) beegoVersion.Set(utils.BEEGO_VERSION)
} }
} }

View File

@ -31,12 +31,12 @@ var gopath utils.DocValue
var beegoVersion utils.DocValue var beegoVersion utils.DocValue
var CmdNew = &commands.Command{ var CmdNew = &commands.Command{
UsageLine: "new [appname] [-gopath=false] [-beego=v1.12.1]", UsageLine: "new [appname] [-gopath=false] [-beego=v1.12.3]",
Short: "Creates a Beego application", Short: "Creates a Beego application",
Long: ` Long: `
Creates a Beego application for the given app name in the current directory. Creates a Beego application for the given app name in the current directory.
now default supoort generate a go modules project now default supoort generate a go modules project
The command 'new' creates a folder named [appname] [-gopath=false] [-beego=v1.12.1] and generates the following structure: The command 'new' creates a folder named [appname] [-gopath=false] [-beego=v1.12.3] and generates the following structure:
main.go main.go
go.mod go.mod
@ -287,7 +287,7 @@ func CreateApp(cmd *commands.Command, args []string) int {
appPath = path.Join(utils.GetBeeWorkPath(), args[0]) appPath = path.Join(utils.GetBeeWorkPath(), args[0])
packPath = args[0] packPath = args[0]
if beegoVersion.String() == `` { if beegoVersion.String() == `` {
beegoVersion.Set(`v1.12.1`) beegoVersion.Set(utils.BEEGO_VERSION)
} }
} }

2
go.mod
View File

@ -3,7 +3,7 @@ module github.com/beego/bee
go 1.13 go 1.13
require ( require (
github.com/astaxie/beego v1.12.2-0.20201105155152-20a0de6bd075 github.com/astaxie/beego v1.12.4-0.20201114080429-05d8e293f7f3
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/flosch/pongo2 v0.0.0-20200529170236-5abacdfa4915 github.com/flosch/pongo2 v0.0.0-20200529170236-5abacdfa4915
github.com/fsnotify/fsnotify v1.4.9 github.com/fsnotify/fsnotify v1.4.9

2
go.sum
View File

@ -27,6 +27,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/astaxie/beego v1.12.2-0.20201105155152-20a0de6bd075 h1:TR1ruJJ5gOHkZh4oc2S9EHEC1Uqrso/BSewu8dQFifM= github.com/astaxie/beego v1.12.2-0.20201105155152-20a0de6bd075 h1:TR1ruJJ5gOHkZh4oc2S9EHEC1Uqrso/BSewu8dQFifM=
github.com/astaxie/beego v1.12.2-0.20201105155152-20a0de6bd075/go.mod h1:Z2in5/6WygF7+WRPaCIOIdckL2TRTiOkOL3mT8+w8Tg= github.com/astaxie/beego v1.12.2-0.20201105155152-20a0de6bd075/go.mod h1:Z2in5/6WygF7+WRPaCIOIdckL2TRTiOkOL3mT8+w8Tg=
github.com/astaxie/beego v1.12.4-0.20201114080429-05d8e293f7f3 h1:etrsSJGR/nmMRNjD2JyOYZEzDpVrkwZioyQs7y54u+o=
github.com/astaxie/beego v1.12.4-0.20201114080429-05d8e293f7f3/go.mod h1:Z2in5/6WygF7+WRPaCIOIdckL2TRTiOkOL3mT8+w8Tg=
github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=
github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

17
utils/version.go Normal file
View File

@ -0,0 +1,17 @@
// Copyright 2020
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package utils
const BEEGO_VERSION = "v1.12.4-0.20201114080429-05d8e293f7f3"