Browse Source

Merge pull request #741 from flycash/updateMd

update beego version
pull/743/head
Ming Deng 8 months ago
committed by GitHub
parent
commit
1653a01eaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/commands/api/apiapp.go
  2. 4
      cmd/commands/hprose/hprose.go
  3. 6
      cmd/commands/new/new.go
  4. 2
      go.mod
  5. 2
      go.sum
  6. 17
      utils/version.go

4
cmd/commands/api/apiapp.go

@ -38,7 +38,7 @@ var CmdApiapp = &commands.Command{
now default supoort generate a go modules project.
{{"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
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])
packPath = args[0]
if beegoVersion.String() == `` {
beegoVersion.Set(`v1.12.1`)
beegoVersion.Set(utils.BEEGO_VERSION)
}
}

4
cmd/commands/hprose/hprose.go

@ -25,7 +25,7 @@ var CmdHproseapp = &commands.Command{
{{"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
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])
packpath = args[0]
if beegoVersion.String() == `` {
beegoVersion.Set(`v1.12.1`)
beegoVersion.Set(utils.BEEGO_VERSION)
}
}

6
cmd/commands/new/new.go

@ -31,12 +31,12 @@ var gopath utils.DocValue
var beegoVersion utils.DocValue
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",
Long: `
Creates a Beego application for the given app name in the current directory.
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
go.mod
@ -287,7 +287,7 @@ func CreateApp(cmd *commands.Command, args []string) int {
appPath = path.Join(utils.GetBeeWorkPath(), args[0])
packPath = args[0]
if beegoVersion.String() == `` {
beegoVersion.Set(`v1.12.1`)
beegoVersion.Set(utils.BEEGO_VERSION)
}
}

2
go.mod

@ -3,7 +3,7 @@ module github.com/beego/bee
go 1.13
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/flosch/pongo2 v0.0.0-20200529170236-5abacdfa4915
github.com/fsnotify/fsnotify v1.4.9

2
go.sum

@ -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/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.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/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=

17
utils/version.go

@ -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"
Loading…
Cancel
Save