Print command

This commit is contained in:
kolaente 2020-08-18 21:09:25 +02:00
parent feacc1a323
commit 1ff0fc6085
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -63,9 +63,12 @@ func Generate() error {
return exec.Command("go", "generate", PACKAGE+"/pkg/static").Run()
}
// Builds a vikunja binary, ready to run.
func Build() error {
mg.Deps(Generate)
out, err := exec.Command("go", "build", Goflags[0], "-tags", Tags, "-ldflags", "-s -w "+Ldflags, "-o", EXECUTABLE).CombinedOutput()
cmd := exec.Command("go", "build", Goflags[0], "-tags", Tags, "-ldflags", "-s -w "+Ldflags, "-o", EXECUTABLE)
fmt.Println(cmd.String())
out, err := cmd.CombinedOutput()
fmt.Print(string(out))
return err
}