mirror of
https://github.com/beego/bee.git
synced 2025-06-11 03:10:40 +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:
@ -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)
|
||||
|
@ -4,14 +4,15 @@ import (
|
||||
"crypto/md5"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
)
|
||||
|
||||
// write to file
|
||||
@ -191,7 +192,7 @@ func GetFilterContent(content string, seg string) string {
|
||||
res := ""
|
||||
for _, s := range strings.Split(content, "\n") {
|
||||
s = strings.TrimSpace(strings.TrimPrefix(s, seg))
|
||||
var have = false
|
||||
var have bool
|
||||
for _,except := range CompareExcept{
|
||||
if strings.HasPrefix(s, except) {
|
||||
have = true
|
||||
|
Reference in New Issue
Block a user