From 0f6d8daa0512c2091b0218070b8c9667f71c3a60 Mon Sep 17 00:00:00 2001 From: "Garcia, Julio C" Date: Fri, 26 Oct 2018 14:27:41 -0600 Subject: [PATCH] fix: improve log output #845 Removed the "creating" prefixes. --- internal/pipe/archive/archive.go | 3 +-- internal/pipe/brew/brew.go | 2 +- internal/pipe/docker/docker.go | 2 +- internal/pipe/nfpm/nfpm.go | 4 ++-- internal/pipe/release/release.go | 2 +- internal/pipe/scoop/scoop.go | 2 +- internal/pipe/snapcraft/snapcraft.go | 4 ++-- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/internal/pipe/archive/archive.go b/internal/pipe/archive/archive.go index 523107d07..d5edca1ca 100644 --- a/internal/pipe/archive/archive.go +++ b/internal/pipe/archive/archive.go @@ -29,7 +29,7 @@ const ( type Pipe struct{} func (Pipe) String() string { - return "creating archives" + return "archives" } // Default sets the pipe defaults @@ -91,7 +91,6 @@ func create(ctx *context.Context, binaries []artifact.Artifact) error { } defer archiveFile.Close() // nolint: errcheck var log = log.WithField("archive", archivePath) - log.Info("creating") var a = archive.New(archiveFile) defer a.Close() // nolint: errcheck diff --git a/internal/pipe/brew/brew.go b/internal/pipe/brew/brew.go index c6bc738a5..c18a78785 100644 --- a/internal/pipe/brew/brew.go +++ b/internal/pipe/brew/brew.go @@ -28,7 +28,7 @@ var ErrTooManyDarwin64Builds = errors.New("brew tap requires at most one darwin type Pipe struct{} func (Pipe) String() string { - return "creating homebrew formula" + return "homebrew formula" } // Publish brew formula diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go index d8f155c6f..68a2644ee 100644 --- a/internal/pipe/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -27,7 +27,7 @@ var ErrNoDocker = errors.New("docker not present in $PATH") type Pipe struct{} func (Pipe) String() string { - return "creating Docker images" + return "Docker images" } // Default sets the pipe defaults diff --git a/internal/pipe/nfpm/nfpm.go b/internal/pipe/nfpm/nfpm.go index 6c907c020..2a257e93b 100644 --- a/internal/pipe/nfpm/nfpm.go +++ b/internal/pipe/nfpm/nfpm.go @@ -30,7 +30,7 @@ const defaultNameTemplate = "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arc type Pipe struct{} func (Pipe) String() string { - return "creating Linux packages with nfpm" + return "Linux packages with nfpm" } // Default sets the pipe defaults @@ -154,7 +154,7 @@ func create(ctx *context.Context, format, arch string, binaries []artifact.Artif } var path = filepath.Join(ctx.Config.Dist, name+"."+format) - log.WithField("file", path).Info("creating") + log.WithField("file", path) w, err := os.Create(path) if err != nil { return err diff --git a/internal/pipe/release/release.go b/internal/pipe/release/release.go index a4b9e2726..a0c12b878 100644 --- a/internal/pipe/release/release.go +++ b/internal/pipe/release/release.go @@ -52,7 +52,7 @@ func doPublish(ctx *context.Context, c client.Client) error { } log.WithField("tag", ctx.Git.CurrentTag). WithField("repo", ctx.Config.Release.GitHub.String()). - Info("creating or updating release") + Info("release") body, err := describeBody(ctx) if err != nil { return err diff --git a/internal/pipe/scoop/scoop.go b/internal/pipe/scoop/scoop.go index fa0bb79c3..d2dd62eb1 100644 --- a/internal/pipe/scoop/scoop.go +++ b/internal/pipe/scoop/scoop.go @@ -21,7 +21,7 @@ var ErrNoWindows = errors.New("scoop requires a windows build") type Pipe struct{} func (Pipe) String() string { - return "creating scoop manifest" + return "scoop manifest" } // Publish scoop manifest diff --git a/internal/pipe/snapcraft/snapcraft.go b/internal/pipe/snapcraft/snapcraft.go index 803f33e38..255b4100a 100644 --- a/internal/pipe/snapcraft/snapcraft.go +++ b/internal/pipe/snapcraft/snapcraft.go @@ -133,7 +133,7 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err } var file = filepath.Join(primeDir, "meta", "snap.yaml") - log.WithField("file", file).Debug("creating snap metadata") + log.WithField("file", file).Debug("snap metadata") var metadata = &Metadata{ Version: ctx.Version, @@ -187,7 +187,7 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err } var snap = filepath.Join(ctx.Config.Dist, folder+".snap") - log.WithField("snap", snap).Info("creating") + log.WithField("snap", snap) /* #nosec */ var cmd = exec.CommandContext(ctx, "snapcraft", "pack", primeDir, "--output", snap) if out, err = cmd.CombinedOutput(); err != nil {