Skip to content

Commit

Permalink
feat: improve output a bit (#1380)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Mar 6, 2020
1 parent 5efb690 commit 81417ea
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 13 deletions.
4 changes: 1 addition & 3 deletions internal/middleware/logging.go
@@ -1,8 +1,6 @@
package middleware

import (
"strings"

"github.com/apex/log"
"github.com/apex/log/handlers/cli"
"github.com/fatih/color"
Expand Down Expand Up @@ -30,7 +28,7 @@ func Logging(title string, next Action, padding Padding) Action {
cli.Default.Padding = int(DefaultInitialPadding)
}()
cli.Default.Padding = int(padding)
log.Infof(color.New(color.Bold).Sprint(strings.ToUpper(title)))
log.Infof(color.New(color.Bold).Sprint(title))
cli.Default.Padding = int(padding + DefaultInitialPadding)
return next(ctx)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/artifactory/artifactory.go
Expand Up @@ -40,7 +40,7 @@ type Pipe struct{}

// String returns the description of the pipe
func (Pipe) String() string {
return "Artifactory"
return "artifactory"
}

// Default sets the pipe defaults
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/before/before.go
Expand Up @@ -16,7 +16,7 @@ type Pipe struct{}

// String is the name of this pipe
func (Pipe) String() string {
return "Running before hooks"
return "running before hooks"
}

// Run executes the hooks
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/blob/blob.go
Expand Up @@ -15,7 +15,7 @@ type Pipe struct{}

// String returns the description of the pipe
func (Pipe) String() string {
return "Blob"
return "blobs"
}

// Default sets the pipe defaults
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/docker/docker.go
Expand Up @@ -26,7 +26,7 @@ var ErrNoDocker = errors.New("docker not present in $PATH")
type Pipe struct{}

func (Pipe) String() string {
return "Docker images"
return "docker images"
}

// Default sets the pipe defaults
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/nfpm/nfpm.go
Expand Up @@ -30,7 +30,7 @@ const defaultNameTemplate = "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arc
type Pipe struct{}

func (Pipe) String() string {
return "Linux packages with nfpm"
return "linux packages"
}

// Default sets the pipe defaults
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/release/release.go
Expand Up @@ -26,7 +26,7 @@ var ErrMultipleReleases = errors.New("multiple releases are defined. Only one is
type Pipe struct{}

func (Pipe) String() string {
return "GitHub/GitLab/Gitea Releases"
return "github/gitlab/gitea releases"
}

// Default sets the pipe defaults
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/scoop/scoop.go
Expand Up @@ -25,7 +25,7 @@ var ErrTokenTypeNotImplementedForScoop = errors.New("token type not implemented
type Pipe struct{}

func (Pipe) String() string {
return "scoop manifest"
return "scoop manifests"
}

// Publish scoop manifest
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/semver/semver.go
Expand Up @@ -13,7 +13,7 @@ type Pipe struct{}

// String is the name of this pipe
func (Pipe) String() string {
return "Parsing tag"
return "parsing tag"
}

// Run executes the hooks
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/snapcraft/snapcraft.go
Expand Up @@ -61,7 +61,7 @@ const defaultNameTemplate = "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arc
type Pipe struct{}

func (Pipe) String() string {
return "Snapcraft Packages"
return "snapcraft packages"
}

// Default sets the pipe defaults
Expand Down
2 changes: 1 addition & 1 deletion internal/pipe/upload/upload.go
Expand Up @@ -17,7 +17,7 @@ type Pipe struct{}

// String returns the description of the pipe
func (Pipe) String() string {
return "HTTP Upload"
return "http upload"
}

// Default sets the pipe defaults
Expand Down

0 comments on commit 81417ea

Please sign in to comment.