|
|
@ -15,7 +15,8 @@ |
|
|
|
package cmd |
|
|
|
package cmd |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
//"os"
|
|
|
|
"os" |
|
|
|
|
|
|
|
"path" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli" |
|
|
|
"github.com/codegangsta/cli" |
|
|
|
|
|
|
|
|
|
|
@ -47,5 +48,15 @@ func runBuild(ctx *cli.Context) { |
|
|
|
log.Fatal("", err.Error()) |
|
|
|
log.Fatal("", err.Error()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if isWindowsXP { |
|
|
|
|
|
|
|
binName := pkgName + ".exe" |
|
|
|
|
|
|
|
os.Remove(binName) |
|
|
|
|
|
|
|
err = os.Rename(path.Join(VENDOR, "src", pkgName, binName), binName) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
log.Error("Build", "Fail to move binary") |
|
|
|
|
|
|
|
log.Fatal("", err.Error()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
log.Success("SUCC", "Build", "Command execute successfully!") |
|
|
|
log.Success("SUCC", "Build", "Command execute successfully!") |
|
|
|
} |
|
|
|
} |
|
|
|