diff --git a/pipeline/brew/brew.go b/pipeline/brew/brew.go index 048fbf69e..d21798c02 100644 --- a/pipeline/brew/brew.go +++ b/pipeline/brew/brew.go @@ -40,7 +40,7 @@ type templateData struct { // Pipe for brew deployment type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Creating homebrew formulae..." } diff --git a/pipeline/build/build.go b/pipeline/build/build.go index 6c82a4f58..436669adc 100644 --- a/pipeline/build/build.go +++ b/pipeline/build/build.go @@ -14,7 +14,7 @@ import ( // Pipe for build type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Building..." } diff --git a/pipeline/compress/compress.go b/pipeline/compress/compress.go index 3f0a2217c..a5bc9297e 100644 --- a/pipeline/compress/compress.go +++ b/pipeline/compress/compress.go @@ -15,7 +15,7 @@ import ( // Pipe for compress type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Creating archives..." } @@ -32,6 +32,7 @@ func (Pipe) Run(ctx *context.Context) error { return g.Wait() } +// Archive represents a compression archive files from disk can be written to. type Archive interface { Close() error Add(name, path string) error diff --git a/pipeline/defaults/defaults.go b/pipeline/defaults/defaults.go index a63c017b5..37e09f75e 100644 --- a/pipeline/defaults/defaults.go +++ b/pipeline/defaults/defaults.go @@ -13,13 +13,13 @@ var defaultFiles = []string{"licence", "license", "readme", "changelog"} // Pipe for brew deployment type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Setting defaults..." } // Run the pipe -func (Pipe) Run(ctx *context.Context) (err error) { +func (Pipe) Run(ctx *context.Context) error { if ctx.Config.Repo == "" { repo, err := remoteRepo() ctx.Config.Repo = repo @@ -61,14 +61,14 @@ func (Pipe) Run(ctx *context.Context) (err error) { } } if len(ctx.Config.Files) != 0 { - return + return nil } files, err := findFiles() if err != nil { - return + return err } ctx.Config.Files = files - return + return nil } func findFiles() (files []string, err error) { diff --git a/pipeline/env/env.go b/pipeline/env/env.go index b35b9ab28..8c72da157 100644 --- a/pipeline/env/env.go +++ b/pipeline/env/env.go @@ -7,12 +7,13 @@ import ( "github.com/goreleaser/releaser/context" ) +// ErrMissingToken indicates an error when GITHUB_TOKEN is missing in the environment var ErrMissingToken = errors.New("Missing GITHUB_TOKEN") // Pipe for env type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Loading data from environment variables..." } diff --git a/pipeline/git/git.go b/pipeline/git/git.go index ed2e5f39c..a137c994a 100644 --- a/pipeline/git/git.go +++ b/pipeline/git/git.go @@ -5,7 +5,7 @@ import "github.com/goreleaser/releaser/context" // Pipe for brew deployment type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Gathering Git data..." } diff --git a/pipeline/release/release.go b/pipeline/release/release.go index 66ddb9152..b17af9fb0 100644 --- a/pipeline/release/release.go +++ b/pipeline/release/release.go @@ -14,7 +14,7 @@ import ( // Pipe for github release type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Releasing to GitHub..." } diff --git a/pipeline/repos/repos.go b/pipeline/repos/repos.go index 17f82c2f7..5a3784420 100644 --- a/pipeline/repos/repos.go +++ b/pipeline/repos/repos.go @@ -9,7 +9,7 @@ import ( // Pipe for brew deployment type Pipe struct{} -// Name of the pipe +// Description of the pipe func (Pipe) Description() string { return "Filling repositories data..." }