2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

helper: cleanups

This commit is contained in:
Michael Eischer 2022-08-20 12:10:29 +02:00
parent e530d422a0
commit ed94678820

View File

@ -103,15 +103,13 @@ func build(sourceDir, outputDir, goos, goarch string) (filename string) {
)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
verbose("run %v %v in %v", "go", c.Args, c.Dir)
c.Dir = sourceDir
c.Env = append(os.Environ(),
"CGO_ENABLED=0",
"GOOS="+goos,
"GOARCH="+goarch,
)
verbose("run %v %v in %v", "go", c.Args, c.Dir)
err := c.Run()
if err != nil {
@ -160,7 +158,6 @@ func compress(goos, inputDir, filename string) (outputFile string) {
c.Stdout = os.Stdout
c.Stderr = os.Stderr
c.Dir = inputDir
verbose("run %v %v in %v", "go", c.Args, c.Dir)
err := c.Run()