Skip to content

Commit

Permalink
build(mage): ♻️ rework go build command-line
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed May 27, 2024
1 parent 0bdaca8 commit c11c11b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build/magefiles/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ func buildProject(arch string) error {
return errors.Join(ErrBuildFailed, err)
}

output := "dist/go-hass-agent-" + arch

slog.Info("Running go build...")
if err := sh.RunWithV(envMap, "go", "build", "-ldflags="+ldflags); err != nil {
return errors.Join(ErrBuildFailed, err)
}
return sh.Copy("dist/go-hass-agent-"+arch, "go-hass-agent")
return sh.RunWithV(envMap, "go", "build", "-ldflags="+ldflags, "-o", output)
}

0 comments on commit c11c11b

Please sign in to comment.