Use runAndStreamOutput everywhere
This commit is contained in:
parent
087c1b352a
commit
9006b6f49c
16
magefile.go
16
magefile.go
|
@ -186,10 +186,12 @@ func IntegrationTest() {
|
|||
runAndStreamOutput("go", "test", Goflags[0], "-p", "1", PACKAGE+"/pkg/integrations")
|
||||
}
|
||||
|
||||
// Formats the code using go fmt
|
||||
func Fmt() {
|
||||
|
||||
}
|
||||
|
||||
// Checks if the code is properly formatted with go fmt
|
||||
func FmtCheck() {
|
||||
|
||||
}
|
||||
|
@ -199,20 +201,14 @@ func Lint() {
|
|||
}
|
||||
|
||||
// Generates static content into the final binary
|
||||
func Generate() error {
|
||||
// TODO: use runAndStreamOutput
|
||||
return exec.Command("go", "generate", PACKAGE+"/pkg/static").Run()
|
||||
func Generate() {
|
||||
runAndStreamOutput("go", "generate", PACKAGE+"/pkg/static")
|
||||
}
|
||||
|
||||
// Builds a vikunja binary, ready to run.
|
||||
func Build() error {
|
||||
func Build() {
|
||||
mg.Deps(Generate)
|
||||
// TODO: use runAndStreamOutput
|
||||
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
|
||||
runAndStreamOutput("go", "build", Goflags[0], "-tags", Tags, "-ldflags", "-s -w "+Ldflags, "-o", Executable)
|
||||
}
|
||||
|
||||
func CompressBuild() {
|
||||
|
|
Loading…
Reference in New Issue