mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-06 03:13:48 +02:00
Merge pull request #253 from goreleaser/pretty-target
pretty target string
This commit is contained in:
commit
2f60fec71c
@ -91,7 +91,7 @@ func run(target buildTarget, command, env []string) error {
|
||||
"GOARM="+target.goarm,
|
||||
)
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
return fmt.Errorf("build failed: %s/%s %s\n%v", target.goos, target.goarch, target.goarm, string(out))
|
||||
return fmt.Errorf("build failed: %s\n%v", target.PrettyString(), string(out))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -19,14 +19,18 @@ func (t buildTarget) String() string {
|
||||
return fmt.Sprintf("%v%v%v", t.goos, t.goarch, t.goarm)
|
||||
}
|
||||
|
||||
func (t buildTarget) PrettyString() string {
|
||||
return fmt.Sprintf("%v/%v%v", t.goos, t.goarch, t.goarm)
|
||||
}
|
||||
|
||||
func buildTargets(ctx *context.Context) (targets []buildTarget) {
|
||||
for _, target := range allBuildTargets(ctx) {
|
||||
if !valid(target) {
|
||||
log.Println("Skipped invalid build target:", target)
|
||||
log.Println("Skipped invalid build target:", target.PrettyString())
|
||||
continue
|
||||
}
|
||||
if ignored(ctx, target) {
|
||||
log.Println("Skipped ignored build target:", target)
|
||||
log.Println("Skipped ignored build target:", target.PrettyString())
|
||||
continue
|
||||
}
|
||||
targets = append(targets, target)
|
||||
|
Loading…
Reference in New Issue
Block a user