New Bee banner

Added a new Bee banner using ASCII art. When bee is invoked,
the banner is displayed with the version number (short banner).
A More verbose Banner is added to 'bee version' which shows
more information about the host and Go runtime.
This commit is contained in:
Faissal Elamraoui
2016-06-01 14:30:29 +02:00
parent 01e7ff3774
commit b8250ebb72
16 changed files with 230 additions and 112 deletions

11
fix.go
View File

@ -8,6 +8,7 @@ import (
"path/filepath"
"regexp"
"strings"
"fmt"
)
var cmdFix = &Command{
@ -25,9 +26,12 @@ func init() {
}
func runFix(cmd *Command, args []string) int {
ShowShortVersionBanner()
ColorLog("[INFO] Upgrading the application...\n")
dir, err := os.Getwd()
if err != nil {
ColorLog("GetCurrent Path:%s\n", err)
ColorLog("[ERRO] GetCurrent Path:%s\n", err)
}
filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
if info.IsDir() {
@ -42,13 +46,14 @@ func runFix(cmd *Command, args []string) int {
if strings.HasSuffix(info.Name(), ".exe") {
return nil
}
ColorLog("%s\n", path)
err = fixFile(path)
fmt.Println("\tfix\t", path)
if err != nil {
ColorLog("fixFile:%s\n", err)
ColorLog("[ERRO] Could not fix file: %s\n", err)
}
return err
})
ColorLog("[INFO] Upgrade done!\n")
return 0
}