From cd56d577234f0bfad606e0edc18ce3832e7fabd3 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 1 Jun 2017 00:10:11 -0300 Subject: [PATCH 1/2] pretty target string --- pipeline/build/target.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipeline/build/target.go b/pipeline/build/target.go index b2e0f2efe..f1c739e9c 100644 --- a/pipeline/build/target.go +++ b/pipeline/build/target.go @@ -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) From 5c1244e8e991ca25dcb89e7065d93d53c0644d24 Mon Sep 17 00:00:00 2001 From: Jorin Vogel Date: Thu, 1 Jun 2017 07:31:38 +0200 Subject: [PATCH 2/2] Use consistent string version of build targets. --- pipeline/build/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/build/build.go b/pipeline/build/build.go index 74ac70a72..b1c50622e 100644 --- a/pipeline/build/build.go +++ b/pipeline/build/build.go @@ -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 }