Created
June 13, 2019 16:13
-
-
Save chirino/8e4e60f56e70d932b5cf9ebe739e57ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mysh = sh.New(). | |
CommandLog(os.Stdout). | |
CommandLogPrefix("> "). | |
Env(map[string]string{ | |
"CGO_ENABLED": "0", | |
"GOOS": "linux", | |
"GOARCH": "amd64", | |
}). | |
Dir("./target") | |
func run(line string) { | |
mysh.Line(line).MustExec() | |
} | |
func BuildExecutable() { | |
run(`go build -o myapp github.com/chirino/cmd/myapp`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment