builds, trying args

This commit is contained in:
Dan Ballard 2014-12-08 23:54:35 -08:00
parent c3e3805f66
commit a8580683de
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,10 @@
package main
import ()
import (
"fmt"
"log"
"os/exec"
)
var buildCmd = &Command{
Name: "build",
@ -11,5 +15,9 @@ var buildCmd = &Command{
}
func buildRun(cmd *Command, args ...string) {
out, err := exec.Command("go", "build", "-ldflags", fmt.Sprintf("\"-X main.Build.Date %s main.Build.GitHash %s main.Build.Num %d\"", "2014-12-08", "a1b2c3d4", 107)).Output()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", out)
}