fix build version again

This commit is contained in:
therecipe 2017-05-16 17:38:52 +02:00
parent 7db0e6284d
commit c9b324147b

View file

@ -45,6 +45,8 @@ func Upgrade() {
utils.RunCmd(exec.Command("go", "clean", "-i", "github.com/therecipe/qt/..."), "run \"go clean\"")
utils.RemoveAll(utils.GoQtPkgPath())
utils.RunCmd(exec.Command("go", "get", "-v", "-d", "github.com/therecipe/qt"), "run \"go get\"")
hash := "please install git"
if _, err := exec.LookPath("git"); err == nil {
cmd := exec.Command("git", "rev-parse", "--verify", "HEAD")
@ -52,5 +54,5 @@ func Upgrade() {
hash = strings.TrimSpace(utils.RunCmdOptional(cmd, "get git hash"))
}
utils.RunCmd(exec.Command("go", "get", "-v", fmt.Sprintf("-ldflags=\"-X=github.com/therecipe/qt/internal/cmd.buildVersion=%v\"", hash), fmt.Sprintf("github.com/therecipe/qt/cmd/...")), "run \"go get\"")
utils.RunCmd(exec.Command("go", "install", "-v", fmt.Sprintf("-ldflags=\"-X=github.com/therecipe/qt/internal/cmd.buildVersion=%v\"", hash), fmt.Sprintf("github.com/therecipe/qt/cmd/...")), "run \"go install\"")
}