1
0
mirror of https://github.com/beego/bee.git synced 2025-06-26 19:10:19 +00:00

add cmd 'bee update' to update self

just notice once a day if there is a new version
This commit is contained in:
wangle
2020-08-02 16:17:02 +08:00
committed by askuy
parent e0ea0abf5b
commit 9c63635169
9 changed files with 119 additions and 58 deletions

View File

@ -1,16 +1,18 @@
package beegopro
import (
"github.com/beego/bee/internal/pkg/system"
beeLogger "github.com/beego/bee/logger"
"github.com/davecgh/go-spew/spew"
"github.com/flosch/pongo2"
"github.com/smartwalle/pongo2render"
"go/format"
"io/ioutil"
"os"
"path"
"path/filepath"
"github.com/davecgh/go-spew/spew"
"github.com/flosch/pongo2"
"github.com/smartwalle/pongo2render"
"github.com/beego/bee/internal/pkg/system"
beeLogger "github.com/beego/bee/logger"
)
// render
@ -140,7 +142,7 @@ func (r *RenderFile) Exec(name string) {
output = bts
}
if FileContentChange(orgContent,output,GetSeg(ext)) {
if FileContentChange(orgContent, output, GetSeg(ext)) {
err = r.write(r.FlushFile, output)
if err != nil {
beeLogger.Log.Fatalf("Could not create file: %s", err)