diff --git a/.gitignore b/.gitignore index 746151687..c68cd6d83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ dist/ -!internal/pipeline/dist +!internal/pipe/dist bin/ vendor coverage.txt diff --git a/Makefile b/Makefile index 215274045..b25380bfd 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ serve: depgraph: go get github.com/kisielk/godepgraph - godepgraph -horizontal -s -o github.com/goreleaser/goreleaser . | dot -Tsvg -o www/static/deps.svg + godepgraph -horizontal -s -o github.com/goreleaser/goreleaser . | dot -Tsvg -o www/static/deps.svg .PHONY: depgraph # Show to-do items per file. diff --git a/internal/http/http.go b/internal/http/http.go index e7bd18009..7b9852a71 100644 --- a/internal/http/http.go +++ b/internal/http/http.go @@ -17,7 +17,7 @@ import ( "github.com/pkg/errors" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/semerrgroup" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" @@ -108,7 +108,7 @@ func CheckConfig(ctx *context.Context, put *config.Put, kind string) error { } func misconfigured(kind string, upload *config.Put, reason string) error { - return pipeline.Skip(fmt.Sprintf("%s section '%s' is not configured properly (%s)", kind, upload.Name, reason)) + return pipe.Skip(fmt.Sprintf("%s section '%s' is not configured properly (%s)", kind, upload.Name, reason)) } // ResponseChecker is a function capable of validating an http server response. @@ -118,7 +118,7 @@ type ResponseChecker func(*h.Response) error // Upload does the actual uploading work func Upload(ctx *context.Context, puts []config.Put, kind string, check ResponseChecker) error { if ctx.SkipPublish { - return pipeline.ErrSkipPublishEnabled + return pipe.ErrSkipPublishEnabled } // Handle every configured put diff --git a/internal/pipeline/archive/archive.go b/internal/pipe/archive/archive.go similarity index 100% rename from internal/pipeline/archive/archive.go rename to internal/pipe/archive/archive.go diff --git a/internal/pipeline/archive/archive_test.go b/internal/pipe/archive/archive_test.go similarity index 100% rename from internal/pipeline/archive/archive_test.go rename to internal/pipe/archive/archive_test.go diff --git a/internal/pipeline/artifactory/artifactory.go b/internal/pipe/artifactory/artifactory.go similarity index 95% rename from internal/pipeline/artifactory/artifactory.go rename to internal/pipe/artifactory/artifactory.go index b2c305503..6bebb7ffa 100644 --- a/internal/pipeline/artifactory/artifactory.go +++ b/internal/pipe/artifactory/artifactory.go @@ -8,7 +8,7 @@ import ( h "net/http" "github.com/goreleaser/goreleaser/internal/http" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -53,14 +53,14 @@ func (Pipe) Default(ctx *context.Context) error { // Docs: https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-Example-DeployinganArtifact func (Pipe) Run(ctx *context.Context) error { if len(ctx.Config.Artifactories) == 0 { - return pipeline.Skip("artifactory section is not configured") + return pipe.Skip("artifactory section is not configured") } // Check requirements for every instance we have configured. // If not fulfilled, we can skip this pipeline for _, instance := range ctx.Config.Artifactories { if skip := http.CheckConfig(ctx, &instance, "artifactory"); skip != nil { - return pipeline.Skip(skip.Error()) + return pipe.Skip(skip.Error()) } } diff --git a/internal/pipeline/artifactory/artifactory_test.go b/internal/pipe/artifactory/artifactory_test.go similarity index 98% rename from internal/pipeline/artifactory/artifactory_test.go rename to internal/pipe/artifactory/artifactory_test.go index 2fd71b76a..9797c66ea 100644 --- a/internal/pipeline/artifactory/artifactory_test.go +++ b/internal/pipe/artifactory/artifactory_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" "github.com/stretchr/testify/assert" @@ -620,8 +620,8 @@ func TestRunPipe_SkipWhenPublishFalse(t *testing.T) { ctx.SkipPublish = true err := Pipe{}.Run(ctx) - assert.True(t, pipeline.IsSkip(err)) - assert.EqualError(t, err, pipeline.ErrSkipPublishEnabled.Error()) + assert.True(t, pipe.IsSkip(err)) + assert.EqualError(t, err, pipe.ErrSkipPublishEnabled.Error()) } func TestRunPipe_DirUpload(t *testing.T) { @@ -663,7 +663,7 @@ func TestDescription(t *testing.T) { } func TestNoArtifactories(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{})))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{})))) } func TestArtifactoriesWithoutTarget(t *testing.T) { @@ -681,7 +681,7 @@ func TestArtifactoriesWithoutTarget(t *testing.T) { }, } - assert.True(t, pipeline.IsSkip(Pipe{}.Run(ctx))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(ctx))) } func TestArtifactoriesWithoutUsername(t *testing.T) { @@ -699,11 +699,11 @@ func TestArtifactoriesWithoutUsername(t *testing.T) { }, } - assert.True(t, pipeline.IsSkip(Pipe{}.Run(ctx))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(ctx))) } func TestArtifactoriesWithoutName(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{ + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{ Artifactories: []config.Put{ { Username: "deployuser", @@ -714,7 +714,7 @@ func TestArtifactoriesWithoutName(t *testing.T) { } func TestArtifactoriesWithoutSecret(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{ + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{ Artifactories: []config.Put{ { Name: "production", diff --git a/internal/pipeline/before/before.go b/internal/pipe/before/before.go similarity index 100% rename from internal/pipeline/before/before.go rename to internal/pipe/before/before.go diff --git a/internal/pipeline/before/before_test.go b/internal/pipe/before/before_test.go similarity index 100% rename from internal/pipeline/before/before_test.go rename to internal/pipe/before/before_test.go diff --git a/internal/pipeline/brew/brew.go b/internal/pipe/brew/brew.go similarity index 94% rename from internal/pipeline/brew/brew.go rename to internal/pipe/brew/brew.go index 87f9cc508..c35b9f731 100644 --- a/internal/pipeline/brew/brew.go +++ b/internal/pipe/brew/brew.go @@ -13,7 +13,7 @@ import ( "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/internal/client" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" @@ -89,10 +89,10 @@ func contains(ss []string, s string) bool { func doRun(ctx *context.Context, client client.Client) error { if ctx.Config.Brew.GitHub.Name == "" { - return pipeline.Skip("brew section is not configured") + return pipe.Skip("brew section is not configured") } if getFormat(ctx) == "binary" { - return pipeline.Skip("archive format is binary") + return pipe.Skip("archive format is binary") } var archives = ctx.Artifacts.Filter( @@ -123,13 +123,13 @@ func doRun(ctx *context.Context, client client.Client) error { } if ctx.Config.Brew.SkipUpload { - return pipeline.Skip("brew.skip_upload is set") + return pipe.Skip("brew.skip_upload is set") } if ctx.SkipPublish { - return pipeline.ErrSkipPublishEnabled + return pipe.ErrSkipPublishEnabled } if ctx.Config.Release.Draft { - return pipeline.Skip("release is marked as draft") + return pipe.Skip("release is marked as draft") } path = filepath.Join(ctx.Config.Brew.Folder, filename) diff --git a/internal/pipeline/brew/brew_test.go b/internal/pipe/brew/brew_test.go similarity index 100% rename from internal/pipeline/brew/brew_test.go rename to internal/pipe/brew/brew_test.go diff --git a/internal/pipeline/brew/doc.go b/internal/pipe/brew/doc.go similarity index 100% rename from internal/pipeline/brew/doc.go rename to internal/pipe/brew/doc.go diff --git a/internal/pipeline/brew/template.go b/internal/pipe/brew/template.go similarity index 100% rename from internal/pipeline/brew/template.go rename to internal/pipe/brew/template.go diff --git a/internal/pipeline/brew/testdata/binary_overridden.rb.golden b/internal/pipe/brew/testdata/binary_overridden.rb.golden similarity index 100% rename from internal/pipeline/brew/testdata/binary_overridden.rb.golden rename to internal/pipe/brew/testdata/binary_overridden.rb.golden diff --git a/internal/pipeline/brew/testdata/build_from_source.rb.golden b/internal/pipe/brew/testdata/build_from_source.rb.golden similarity index 100% rename from internal/pipeline/brew/testdata/build_from_source.rb.golden rename to internal/pipe/brew/testdata/build_from_source.rb.golden diff --git a/internal/pipeline/brew/testdata/custom_download_strategy.rb.golden b/internal/pipe/brew/testdata/custom_download_strategy.rb.golden similarity index 100% rename from internal/pipeline/brew/testdata/custom_download_strategy.rb.golden rename to internal/pipe/brew/testdata/custom_download_strategy.rb.golden diff --git a/internal/pipeline/brew/testdata/default.rb.golden b/internal/pipe/brew/testdata/default.rb.golden similarity index 100% rename from internal/pipeline/brew/testdata/default.rb.golden rename to internal/pipe/brew/testdata/default.rb.golden diff --git a/internal/pipeline/brew/testdata/github_enterprise_url.rb.golden b/internal/pipe/brew/testdata/github_enterprise_url.rb.golden similarity index 100% rename from internal/pipeline/brew/testdata/github_enterprise_url.rb.golden rename to internal/pipe/brew/testdata/github_enterprise_url.rb.golden diff --git a/internal/pipeline/brew/testdata/test.rb.golden b/internal/pipe/brew/testdata/test.rb.golden similarity index 100% rename from internal/pipeline/brew/testdata/test.rb.golden rename to internal/pipe/brew/testdata/test.rb.golden diff --git a/internal/pipeline/build/build.go b/internal/pipe/build/build.go similarity index 100% rename from internal/pipeline/build/build.go rename to internal/pipe/build/build.go diff --git a/internal/pipeline/build/build_test.go b/internal/pipe/build/build_test.go similarity index 100% rename from internal/pipeline/build/build_test.go rename to internal/pipe/build/build_test.go diff --git a/internal/pipeline/changelog/changelog.go b/internal/pipe/changelog/changelog.go similarity index 94% rename from internal/pipeline/changelog/changelog.go rename to internal/pipe/changelog/changelog.go index 3a08d92ec..e02cff3df 100644 --- a/internal/pipeline/changelog/changelog.go +++ b/internal/pipe/changelog/changelog.go @@ -13,7 +13,7 @@ import ( "github.com/apex/log" "github.com/goreleaser/goreleaser/internal/git" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -30,10 +30,10 @@ func (Pipe) String() string { // Run the pipe func (Pipe) Run(ctx *context.Context) error { if ctx.ReleaseNotes != "" { - return pipeline.Skip("release notes already provided via --release-notes") + return pipe.Skip("release notes already provided via --release-notes") } if ctx.Snapshot { - return pipeline.Skip("not available for snapshots") + return pipe.Skip("not available for snapshots") } if err := checkSortDirection(ctx.Config.Changelog.Sort); err != nil { return err diff --git a/internal/pipeline/changelog/changelog_test.go b/internal/pipe/changelog/changelog_test.go similarity index 100% rename from internal/pipeline/changelog/changelog_test.go rename to internal/pipe/changelog/changelog_test.go diff --git a/internal/pipeline/checksums/checksums.go b/internal/pipe/checksums/checksums.go similarity index 100% rename from internal/pipeline/checksums/checksums.go rename to internal/pipe/checksums/checksums.go diff --git a/internal/pipeline/checksums/checksums_test.go b/internal/pipe/checksums/checksums_test.go similarity index 100% rename from internal/pipeline/checksums/checksums_test.go rename to internal/pipe/checksums/checksums_test.go diff --git a/internal/pipeline/defaults/defaults.go b/internal/pipe/defaults/defaults.go similarity index 56% rename from internal/pipeline/defaults/defaults.go rename to internal/pipe/defaults/defaults.go index 4d5043f56..698e84933 100644 --- a/internal/pipeline/defaults/defaults.go +++ b/internal/pipe/defaults/defaults.go @@ -6,21 +6,21 @@ import ( "fmt" "github.com/apex/log" - "github.com/goreleaser/goreleaser/internal/pipeline/archive" - "github.com/goreleaser/goreleaser/internal/pipeline/artifactory" - "github.com/goreleaser/goreleaser/internal/pipeline/brew" - "github.com/goreleaser/goreleaser/internal/pipeline/build" - "github.com/goreleaser/goreleaser/internal/pipeline/checksums" - "github.com/goreleaser/goreleaser/internal/pipeline/docker" - "github.com/goreleaser/goreleaser/internal/pipeline/env" - "github.com/goreleaser/goreleaser/internal/pipeline/nfpm" - "github.com/goreleaser/goreleaser/internal/pipeline/project" - "github.com/goreleaser/goreleaser/internal/pipeline/release" - "github.com/goreleaser/goreleaser/internal/pipeline/s3" - "github.com/goreleaser/goreleaser/internal/pipeline/scoop" - "github.com/goreleaser/goreleaser/internal/pipeline/sign" - "github.com/goreleaser/goreleaser/internal/pipeline/snapcraft" - "github.com/goreleaser/goreleaser/internal/pipeline/snapshot" + "github.com/goreleaser/goreleaser/internal/pipe/archive" + "github.com/goreleaser/goreleaser/internal/pipe/artifactory" + "github.com/goreleaser/goreleaser/internal/pipe/brew" + "github.com/goreleaser/goreleaser/internal/pipe/build" + "github.com/goreleaser/goreleaser/internal/pipe/checksums" + "github.com/goreleaser/goreleaser/internal/pipe/docker" + "github.com/goreleaser/goreleaser/internal/pipe/env" + "github.com/goreleaser/goreleaser/internal/pipe/nfpm" + "github.com/goreleaser/goreleaser/internal/pipe/project" + "github.com/goreleaser/goreleaser/internal/pipe/release" + "github.com/goreleaser/goreleaser/internal/pipe/s3" + "github.com/goreleaser/goreleaser/internal/pipe/scoop" + "github.com/goreleaser/goreleaser/internal/pipe/sign" + "github.com/goreleaser/goreleaser/internal/pipe/snapcraft" + "github.com/goreleaser/goreleaser/internal/pipe/snapshot" "github.com/goreleaser/goreleaser/pkg/context" ) diff --git a/internal/pipeline/defaults/defaults_test.go b/internal/pipe/defaults/defaults_test.go similarity index 100% rename from internal/pipeline/defaults/defaults_test.go rename to internal/pipe/defaults/defaults_test.go diff --git a/internal/pipeline/dist/dist.go b/internal/pipe/dist/dist.go similarity index 100% rename from internal/pipeline/dist/dist.go rename to internal/pipe/dist/dist.go diff --git a/internal/pipeline/dist/dist_test.go b/internal/pipe/dist/dist_test.go similarity index 100% rename from internal/pipeline/dist/dist_test.go rename to internal/pipe/dist/dist_test.go diff --git a/internal/pipeline/docker/docker.go b/internal/pipe/docker/docker.go similarity index 96% rename from internal/pipeline/docker/docker.go rename to internal/pipe/docker/docker.go index cc1bd9f5b..75e1f5ea3 100644 --- a/internal/pipeline/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -13,7 +13,7 @@ import ( "github.com/pkg/errors" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/semerrgroup" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/config" @@ -60,7 +60,7 @@ func (Pipe) Default(ctx *context.Context) error { // Run the pipe func (Pipe) Run(ctx *context.Context) error { if len(ctx.Config.Dockers) == 0 || ctx.Config.Dockers[0].Image == "" { - return pipeline.Skip("docker section is not configured") + return pipe.Skip("docker section is not configured") } _, err := exec.LookPath("docker") if err != nil { @@ -165,12 +165,12 @@ func link(src, dest string) error { func publish(ctx *context.Context, docker config.Docker, images []string) error { if ctx.SkipPublish { // TODO: this should be better handled - log.Warn(pipeline.ErrSkipPublishEnabled.Error()) + log.Warn(pipe.ErrSkipPublishEnabled.Error()) return nil } if docker.SkipPush { // TODO: this should also be better handled - log.Warn(pipeline.Skip("skip_push is set").Error()) + log.Warn(pipe.Skip("skip_push is set").Error()) return nil } for _, image := range images { diff --git a/internal/pipeline/docker/docker_test.go b/internal/pipe/docker/docker_test.go similarity index 98% rename from internal/pipeline/docker/docker_test.go rename to internal/pipe/docker/docker_test.go index c726fe486..64e009423 100644 --- a/internal/pipeline/docker/docker_test.go +++ b/internal/pipe/docker/docker_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" "github.com/stretchr/testify/assert" @@ -420,11 +420,11 @@ func TestDescription(t *testing.T) { } func TestNoDockers(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{})))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{})))) } func TestNoDockerWithoutImageName(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{ + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{ Dockers: []config.Docker{ { Goos: "linux", diff --git a/internal/pipeline/docker/testdata/Dockerfile b/internal/pipe/docker/testdata/Dockerfile similarity index 100% rename from internal/pipeline/docker/testdata/Dockerfile rename to internal/pipe/docker/testdata/Dockerfile diff --git a/internal/pipeline/docker/testdata/Dockerfile.bad b/internal/pipe/docker/testdata/Dockerfile.bad similarity index 100% rename from internal/pipeline/docker/testdata/Dockerfile.bad rename to internal/pipe/docker/testdata/Dockerfile.bad diff --git a/internal/pipeline/docker/testdata/extra_file.txt b/internal/pipe/docker/testdata/extra_file.txt similarity index 100% rename from internal/pipeline/docker/testdata/extra_file.txt rename to internal/pipe/docker/testdata/extra_file.txt diff --git a/internal/pipeline/effectiveconfig/config.go b/internal/pipe/effectiveconfig/config.go similarity index 100% rename from internal/pipeline/effectiveconfig/config.go rename to internal/pipe/effectiveconfig/config.go diff --git a/internal/pipeline/effectiveconfig/config_test.go b/internal/pipe/effectiveconfig/config_test.go similarity index 100% rename from internal/pipeline/effectiveconfig/config_test.go rename to internal/pipe/effectiveconfig/config_test.go diff --git a/internal/pipeline/env/env.go b/internal/pipe/env/env.go similarity index 91% rename from internal/pipeline/env/env.go rename to internal/pipe/env/env.go index 34f3f6ddf..b69743c9a 100644 --- a/internal/pipeline/env/env.go +++ b/internal/pipe/env/env.go @@ -6,7 +6,7 @@ import ( "bufio" "os" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/context" homedir "github.com/mitchellh/go-homedir" "github.com/pkg/errors" @@ -36,10 +36,10 @@ func (Pipe) Run(ctx *context.Context) error { token, err := loadEnv("GITHUB_TOKEN", ctx.Config.EnvFiles.GitHubToken) ctx.Token = token if ctx.SkipPublish { - return pipeline.ErrSkipPublishEnabled + return pipe.ErrSkipPublishEnabled } if ctx.Config.Release.Disable { - return pipeline.Skip("release pipe is disabled") + return pipe.Skip("release pipe is disabled") } if ctx.Token == "" && err == nil { return ErrMissingToken diff --git a/internal/pipeline/env/env_test.go b/internal/pipe/env/env_test.go similarity index 100% rename from internal/pipeline/env/env_test.go rename to internal/pipe/env/env_test.go diff --git a/internal/pipeline/git/doc.go b/internal/pipe/git/doc.go similarity index 100% rename from internal/pipeline/git/doc.go rename to internal/pipe/git/doc.go diff --git a/internal/pipeline/git/errors.go b/internal/pipe/git/errors.go similarity index 100% rename from internal/pipeline/git/errors.go rename to internal/pipe/git/errors.go diff --git a/internal/pipeline/git/git.go b/internal/pipe/git/git.go similarity index 95% rename from internal/pipeline/git/git.go rename to internal/pipe/git/git.go index 38464a706..9dd579753 100644 --- a/internal/pipeline/git/git.go +++ b/internal/pipe/git/git.go @@ -8,7 +8,7 @@ import ( "github.com/apex/log" "github.com/goreleaser/goreleaser/internal/git" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/context" "github.com/pkg/errors" @@ -96,10 +96,10 @@ func setVersion(ctx *context.Context) error { func validate(ctx *context.Context) error { if ctx.Snapshot { - return pipeline.ErrSnapshotEnabled + return pipe.ErrSnapshotEnabled } if ctx.SkipValidate { - return pipeline.ErrSkipValidateEnabled + return pipe.ErrSkipValidateEnabled } out, err := git.Run("status", "--porcelain") if strings.TrimSpace(out) != "" || err != nil { diff --git a/internal/pipeline/git/git_test.go b/internal/pipe/git/git_test.go similarity index 100% rename from internal/pipeline/git/git_test.go rename to internal/pipe/git/git_test.go diff --git a/internal/pipeline/nfpm/nfpm.go b/internal/pipe/nfpm/nfpm.go similarity index 97% rename from internal/pipeline/nfpm/nfpm.go rename to internal/pipe/nfpm/nfpm.go index b27824466..6c907c020 100644 --- a/internal/pipeline/nfpm/nfpm.go +++ b/internal/pipe/nfpm/nfpm.go @@ -17,7 +17,7 @@ import ( "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/internal/linux" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/semerrgroup" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/config" @@ -51,7 +51,7 @@ func (Pipe) Default(ctx *context.Context) error { // Run the pipe func (Pipe) Run(ctx *context.Context) error { if len(ctx.Config.NFPM.Formats) == 0 { - return pipeline.Skip("no output formats configured") + return pipe.Skip("no output formats configured") } return doRun(ctx) } diff --git a/internal/pipeline/nfpm/nfpm_test.go b/internal/pipe/nfpm/nfpm_test.go similarity index 100% rename from internal/pipeline/nfpm/nfpm_test.go rename to internal/pipe/nfpm/nfpm_test.go diff --git a/internal/pipeline/nfpm/testdata/testfile.txt b/internal/pipe/nfpm/testdata/testfile.txt similarity index 100% rename from internal/pipeline/nfpm/testdata/testfile.txt rename to internal/pipe/nfpm/testdata/testfile.txt diff --git a/internal/pipe/pipe.go b/internal/pipe/pipe.go new file mode 100644 index 000000000..cd02f9681 --- /dev/null +++ b/internal/pipe/pipe.go @@ -0,0 +1,39 @@ +// Package pipe provides generic erros for pipes to use. +package pipe + +// ErrSnapshotEnabled happens when goreleaser is running in snapshot mode. +// It usually means that publishing and maybe some validations were skipped. +var ErrSnapshotEnabled = Skip("disabled during snapshot mode") + +// ErrSkipPublishEnabled happens if --skip-publish is set. +// It means that the part of a Piper that publishes its artifacts was not run. +var ErrSkipPublishEnabled = Skip("publishing is disabled") + +// ErrSkipSignEnabled happens if --skip-sign is set. +// It means that the part of a Piper that signs some things was not run. +var ErrSkipSignEnabled = Skip("artifact signing is disabled") + +// ErrSkipValidateEnabled happens if --skip-validate is set. +// It means that the part of a Piper that validates some things was not run. +var ErrSkipValidateEnabled = Skip("validation is disabled") + +// IsSkip returns true if the error is an ErrSkip +func IsSkip(err error) bool { + _, ok := err.(ErrSkip) + return ok +} + +// ErrSkip occurs when a pipe is skipped for some reason +type ErrSkip struct { + reason string +} + +// Error implements the error interface. returns the reason the pipe was skipped +func (e ErrSkip) Error() string { + return e.reason +} + +// Skip skips this pipe with the given reason +func Skip(reason string) ErrSkip { + return ErrSkip{reason: reason} +} diff --git a/internal/pipeline/pipeline_test.go b/internal/pipe/pipe_test.go similarity index 95% rename from internal/pipeline/pipeline_test.go rename to internal/pipe/pipe_test.go index 6ff8e0cc4..593170b37 100644 --- a/internal/pipeline/pipeline_test.go +++ b/internal/pipe/pipe_test.go @@ -1,4 +1,4 @@ -package pipeline +package pipe import ( "errors" diff --git a/internal/pipeline/project/project.go b/internal/pipe/project/project.go similarity index 100% rename from internal/pipeline/project/project.go rename to internal/pipe/project/project.go diff --git a/internal/pipeline/project/project_test.go b/internal/pipe/project/project_test.go similarity index 100% rename from internal/pipeline/project/project_test.go rename to internal/pipe/project/project_test.go diff --git a/internal/pipeline/put/put.go b/internal/pipe/put/put.go similarity index 87% rename from internal/pipeline/put/put.go rename to internal/pipe/put/put.go index 991bd6a36..25109393f 100644 --- a/internal/pipeline/put/put.go +++ b/internal/pipe/put/put.go @@ -5,7 +5,7 @@ import ( h "net/http" "github.com/goreleaser/goreleaser/internal/http" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/context" "github.com/pkg/errors" ) @@ -27,14 +27,14 @@ func (Pipe) Default(ctx *context.Context) error { func (Pipe) Run(ctx *context.Context) error { if len(ctx.Config.Puts) == 0 { - return pipeline.Skip("put section is not configured") + return pipe.Skip("put section is not configured") } // Check requirements for every instance we have configured. // If not fulfilled, we can skip this pipeline for _, instance := range ctx.Config.Puts { if skip := http.CheckConfig(ctx, &instance, "put"); skip != nil { - return pipeline.Skip(skip.Error()) + return pipe.Skip(skip.Error()) } } diff --git a/internal/pipeline/put/put_test.go b/internal/pipe/put/put_test.go similarity index 97% rename from internal/pipeline/put/put_test.go rename to internal/pipe/put/put_test.go index dc9795402..a51795435 100644 --- a/internal/pipeline/put/put_test.go +++ b/internal/pipe/put/put_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" "github.com/stretchr/testify/assert" @@ -404,8 +404,8 @@ func TestRunPipe_SkipWhenPublishFalse(t *testing.T) { ctx.SkipPublish = true err := Pipe{}.Run(ctx) - assert.True(t, pipeline.IsSkip(err)) - assert.EqualError(t, err, pipeline.ErrSkipPublishEnabled.Error()) + assert.True(t, pipe.IsSkip(err)) + assert.EqualError(t, err, pipe.ErrSkipPublishEnabled.Error()) } func TestRunPipe_DirUpload(t *testing.T) { @@ -447,7 +447,7 @@ func TestDescription(t *testing.T) { } func TestNoPuts(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{})))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{})))) } func TestPutsWithoutTarget(t *testing.T) { @@ -465,7 +465,7 @@ func TestPutsWithoutTarget(t *testing.T) { }, } - assert.True(t, pipeline.IsSkip(Pipe{}.Run(ctx))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(ctx))) } func TestPutsWithoutUsername(t *testing.T) { @@ -483,11 +483,11 @@ func TestPutsWithoutUsername(t *testing.T) { }, } - assert.True(t, pipeline.IsSkip(Pipe{}.Run(ctx))) + assert.True(t, pipe.IsSkip(Pipe{}.Run(ctx))) } func TestPutsWithoutName(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{ + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{ Puts: []config.Put{ { Username: "deployuser", @@ -498,7 +498,7 @@ func TestPutsWithoutName(t *testing.T) { } func TestPutsWithoutSecret(t *testing.T) { - assert.True(t, pipeline.IsSkip(Pipe{}.Run(context.New(config.Project{ + assert.True(t, pipe.IsSkip(Pipe{}.Run(context.New(config.Project{ Puts: []config.Put{ { Name: "production", diff --git a/internal/pipeline/release/body.go b/internal/pipe/release/body.go similarity index 100% rename from internal/pipeline/release/body.go rename to internal/pipe/release/body.go diff --git a/internal/pipeline/release/body_test.go b/internal/pipe/release/body_test.go similarity index 100% rename from internal/pipeline/release/body_test.go rename to internal/pipe/release/body_test.go diff --git a/internal/pipeline/release/doc.go b/internal/pipe/release/doc.go similarity index 100% rename from internal/pipeline/release/doc.go rename to internal/pipe/release/doc.go diff --git a/internal/pipeline/release/release.go b/internal/pipe/release/release.go similarity index 93% rename from internal/pipeline/release/release.go rename to internal/pipe/release/release.go index 1b824d5cd..64130af62 100644 --- a/internal/pipeline/release/release.go +++ b/internal/pipe/release/release.go @@ -7,7 +7,7 @@ import ( "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/internal/client" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/semerrgroup" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -49,10 +49,10 @@ func (Pipe) Run(ctx *context.Context) error { func doRun(ctx *context.Context, c client.Client) error { if ctx.Config.Release.Disable { - return pipeline.Skip("release pipe is disabled") + return pipe.Skip("release pipe is disabled") } if ctx.SkipPublish { - return pipeline.ErrSkipPublishEnabled + return pipe.ErrSkipPublishEnabled } log.WithField("tag", ctx.Git.CurrentTag). WithField("repo", ctx.Config.Release.GitHub.String()). diff --git a/internal/pipeline/release/release_test.go b/internal/pipe/release/release_test.go similarity index 100% rename from internal/pipeline/release/release_test.go rename to internal/pipe/release/release_test.go diff --git a/internal/pipeline/release/remote.go b/internal/pipe/release/remote.go similarity index 100% rename from internal/pipeline/release/remote.go rename to internal/pipe/release/remote.go diff --git a/internal/pipeline/release/remote_test.go b/internal/pipe/release/remote_test.go similarity index 100% rename from internal/pipeline/release/remote_test.go rename to internal/pipe/release/remote_test.go diff --git a/internal/pipeline/release/testdata/release1.golden b/internal/pipe/release/testdata/release1.golden similarity index 100% rename from internal/pipeline/release/testdata/release1.golden rename to internal/pipe/release/testdata/release1.golden diff --git a/internal/pipeline/release/testdata/release2.golden b/internal/pipe/release/testdata/release2.golden similarity index 100% rename from internal/pipeline/release/testdata/release2.golden rename to internal/pipe/release/testdata/release2.golden diff --git a/internal/pipeline/s3/awssession.go b/internal/pipe/s3/awssession.go similarity index 100% rename from internal/pipeline/s3/awssession.go rename to internal/pipe/s3/awssession.go diff --git a/internal/pipeline/s3/awssession_test.go b/internal/pipe/s3/awssession_test.go similarity index 100% rename from internal/pipeline/s3/awssession_test.go rename to internal/pipe/s3/awssession_test.go diff --git a/internal/pipeline/s3/s3.go b/internal/pipe/s3/s3.go similarity index 94% rename from internal/pipeline/s3/s3.go rename to internal/pipe/s3/s3.go index 9903ec940..eb243b6d8 100644 --- a/internal/pipeline/s3/s3.go +++ b/internal/pipe/s3/s3.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/semerrgroup" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/config" @@ -47,10 +47,10 @@ func (Pipe) Default(ctx *context.Context) error { // Run the pipe func (Pipe) Run(ctx *context.Context) error { if ctx.SkipPublish { - return pipeline.ErrSkipPublishEnabled + return pipe.ErrSkipPublishEnabled } if len(ctx.Config.S3) == 0 { - return pipeline.Skip("s3 section is not configured") + return pipe.Skip("s3 section is not configured") } var g = semerrgroup.New(ctx.Parallelism) for _, conf := range ctx.Config.S3 { diff --git a/internal/pipeline/s3/s3_test.go b/internal/pipe/s3/s3_test.go similarity index 96% rename from internal/pipeline/s3/s3_test.go rename to internal/pipe/s3/s3_test.go index b5f90cc6e..a1e578163 100644 --- a/internal/pipeline/s3/s3_test.go +++ b/internal/pipe/s3/s3_test.go @@ -11,7 +11,7 @@ import ( "github.com/apex/log" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/testlib" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" @@ -80,8 +80,8 @@ func TestSkipPublish(t *testing.T) { ctx.SkipPublish = true require.NoError(t, Pipe{}.Default(ctx)) err = Pipe{}.Run(ctx) - assert.True(t, pipeline.IsSkip(err)) - assert.EqualError(t, err, pipeline.ErrSkipPublishEnabled.Error()) + assert.True(t, pipe.IsSkip(err)) + assert.EqualError(t, err, pipe.ErrSkipPublishEnabled.Error()) } func TestUpload(t *testing.T) { diff --git a/internal/pipeline/s3/testdata/config.ini b/internal/pipe/s3/testdata/config.ini similarity index 100% rename from internal/pipeline/s3/testdata/config.ini rename to internal/pipe/s3/testdata/config.ini diff --git a/internal/pipeline/s3/testdata/config/certs/CAs/.gitkeep b/internal/pipe/s3/testdata/config/certs/CAs/.gitkeep similarity index 100% rename from internal/pipeline/s3/testdata/config/certs/CAs/.gitkeep rename to internal/pipe/s3/testdata/config/certs/CAs/.gitkeep diff --git a/internal/pipeline/s3/testdata/config/config.json b/internal/pipe/s3/testdata/config/config.json similarity index 100% rename from internal/pipeline/s3/testdata/config/config.json rename to internal/pipe/s3/testdata/config/config.json diff --git a/internal/pipeline/s3/testdata/credentials.ini b/internal/pipe/s3/testdata/credentials.ini similarity index 100% rename from internal/pipeline/s3/testdata/credentials.ini rename to internal/pipe/s3/testdata/credentials.ini diff --git a/internal/pipeline/s3/testdata/data/.gitignore b/internal/pipe/s3/testdata/data/.gitignore similarity index 100% rename from internal/pipeline/s3/testdata/data/.gitignore rename to internal/pipe/s3/testdata/data/.gitignore diff --git a/internal/pipeline/s3/testdata/data/test/.gitignore b/internal/pipe/s3/testdata/data/test/.gitignore similarity index 100% rename from internal/pipeline/s3/testdata/data/test/.gitignore rename to internal/pipe/s3/testdata/data/test/.gitignore diff --git a/internal/pipeline/s3/testdata/data/test/.gitkeep b/internal/pipe/s3/testdata/data/test/.gitkeep similarity index 100% rename from internal/pipeline/s3/testdata/data/test/.gitkeep rename to internal/pipe/s3/testdata/data/test/.gitkeep diff --git a/internal/pipeline/scoop/scoop.go b/internal/pipe/scoop/scoop.go similarity index 94% rename from internal/pipeline/scoop/scoop.go rename to internal/pipe/scoop/scoop.go index b833ba231..5ed311e91 100644 --- a/internal/pipeline/scoop/scoop.go +++ b/internal/pipe/scoop/scoop.go @@ -9,7 +9,7 @@ import ( "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/internal/client" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -54,10 +54,10 @@ func (Pipe) Default(ctx *context.Context) error { func doRun(ctx *context.Context, client client.Client) error { if ctx.Config.Scoop.Bucket.Name == "" { - return pipeline.Skip("scoop section is not configured") + return pipe.Skip("scoop section is not configured") } if ctx.Config.Archive.Format == "binary" { - return pipeline.Skip("archive format is binary") + return pipe.Skip("archive format is binary") } var archives = ctx.Artifacts.Filter( @@ -78,10 +78,10 @@ func doRun(ctx *context.Context, client client.Client) error { } if ctx.SkipPublish { - return pipeline.ErrSkipPublishEnabled + return pipe.ErrSkipPublishEnabled } if ctx.Config.Release.Draft { - return pipeline.Skip("release is marked as draft") + return pipe.Skip("release is marked as draft") } return client.CreateFile( ctx, diff --git a/internal/pipeline/scoop/scoop_test.go b/internal/pipe/scoop/scoop_test.go similarity index 99% rename from internal/pipeline/scoop/scoop_test.go rename to internal/pipe/scoop/scoop_test.go index 38fbf7568..23cb63b4e 100644 --- a/internal/pipeline/scoop/scoop_test.go +++ b/internal/pipe/scoop/scoop_test.go @@ -11,7 +11,7 @@ import ( "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/internal/client" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/testlib" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" @@ -286,7 +286,7 @@ func Test_doRun(t *testing.T) { {Name: "foo_1.0.1_windows_amd64.tar.gz", Goos: "windows", Goarch: "amd64", Path: file}, {Name: "foo_1.0.1_windows_386.tar.gz", Goos: "windows", Goarch: "386", Path: file}, }, - shouldErr(pipeline.ErrSkipPublishEnabled.Error()), + shouldErr(pipe.ErrSkipPublishEnabled.Error()), }, { "is draft", diff --git a/internal/pipeline/scoop/testdata/test_buildmanifest.json.golden b/internal/pipe/scoop/testdata/test_buildmanifest.json.golden similarity index 100% rename from internal/pipeline/scoop/testdata/test_buildmanifest.json.golden rename to internal/pipe/scoop/testdata/test_buildmanifest.json.golden diff --git a/internal/pipeline/scoop/testdata/test_buildmanifest_url_template.json.golden b/internal/pipe/scoop/testdata/test_buildmanifest_url_template.json.golden similarity index 100% rename from internal/pipeline/scoop/testdata/test_buildmanifest_url_template.json.golden rename to internal/pipe/scoop/testdata/test_buildmanifest_url_template.json.golden diff --git a/internal/pipeline/sign/sign.go b/internal/pipe/sign/sign.go similarity index 95% rename from internal/pipeline/sign/sign.go rename to internal/pipe/sign/sign.go index e3e50257b..9ed5922e0 100644 --- a/internal/pipeline/sign/sign.go +++ b/internal/pipe/sign/sign.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -39,7 +39,7 @@ func (Pipe) Default(ctx *context.Context) error { // Run executes the Pipe. func (Pipe) Run(ctx *context.Context) error { if ctx.SkipSign { - return pipeline.ErrSkipSignEnabled + return pipe.ErrSkipSignEnabled } switch ctx.Config.Sign.Artifacts { @@ -54,7 +54,7 @@ func (Pipe) Run(ctx *context.Context) error { artifact.ByType(artifact.LinuxPackage), )).List()) case "none": - return pipeline.ErrSkipSignEnabled + return pipe.ErrSkipSignEnabled default: return fmt.Errorf("invalid list of artifacts to sign: %s", ctx.Config.Sign.Artifacts) } diff --git a/internal/pipeline/sign/sign_test.go b/internal/pipe/sign/sign_test.go similarity index 100% rename from internal/pipeline/sign/sign_test.go rename to internal/pipe/sign/sign_test.go diff --git a/internal/pipeline/sign/testdata/.gitignore b/internal/pipe/sign/testdata/.gitignore similarity index 100% rename from internal/pipeline/sign/testdata/.gitignore rename to internal/pipe/sign/testdata/.gitignore diff --git a/internal/pipeline/sign/testdata/README.md b/internal/pipe/sign/testdata/README.md similarity index 100% rename from internal/pipeline/sign/testdata/README.md rename to internal/pipe/sign/testdata/README.md diff --git a/internal/pipeline/sign/testdata/gnupg/.gitignore b/internal/pipe/sign/testdata/gnupg/.gitignore similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/.gitignore rename to internal/pipe/sign/testdata/gnupg/.gitignore diff --git a/internal/pipeline/sign/testdata/gnupg/.gpg-v21-migrated b/internal/pipe/sign/testdata/gnupg/.gpg-v21-migrated similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/.gpg-v21-migrated rename to internal/pipe/sign/testdata/gnupg/.gpg-v21-migrated diff --git a/internal/pipeline/sign/testdata/gnupg/openpgp-revocs.d/23E7505EC0A490C582CB9B27F1D733BF0B343347.rev b/internal/pipe/sign/testdata/gnupg/openpgp-revocs.d/23E7505EC0A490C582CB9B27F1D733BF0B343347.rev similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/openpgp-revocs.d/23E7505EC0A490C582CB9B27F1D733BF0B343347.rev rename to internal/pipe/sign/testdata/gnupg/openpgp-revocs.d/23E7505EC0A490C582CB9B27F1D733BF0B343347.rev diff --git a/internal/pipeline/sign/testdata/gnupg/private-keys-v1.d/6B365DDB6E25317FED9A739DC350E033855A833A.key b/internal/pipe/sign/testdata/gnupg/private-keys-v1.d/6B365DDB6E25317FED9A739DC350E033855A833A.key similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/private-keys-v1.d/6B365DDB6E25317FED9A739DC350E033855A833A.key rename to internal/pipe/sign/testdata/gnupg/private-keys-v1.d/6B365DDB6E25317FED9A739DC350E033855A833A.key diff --git a/internal/pipeline/sign/testdata/gnupg/private-keys-v1.d/939A5E777E4F7DFF2FA87806D0155052B5FC8F56.key b/internal/pipe/sign/testdata/gnupg/private-keys-v1.d/939A5E777E4F7DFF2FA87806D0155052B5FC8F56.key similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/private-keys-v1.d/939A5E777E4F7DFF2FA87806D0155052B5FC8F56.key rename to internal/pipe/sign/testdata/gnupg/private-keys-v1.d/939A5E777E4F7DFF2FA87806D0155052B5FC8F56.key diff --git a/internal/pipeline/sign/testdata/gnupg/pubring.gpg b/internal/pipe/sign/testdata/gnupg/pubring.gpg similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/pubring.gpg rename to internal/pipe/sign/testdata/gnupg/pubring.gpg diff --git a/internal/pipeline/sign/testdata/gnupg/pubring.kbx b/internal/pipe/sign/testdata/gnupg/pubring.kbx similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/pubring.kbx rename to internal/pipe/sign/testdata/gnupg/pubring.kbx diff --git a/internal/pipeline/sign/testdata/gnupg/secring.gpg b/internal/pipe/sign/testdata/gnupg/secring.gpg similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/secring.gpg rename to internal/pipe/sign/testdata/gnupg/secring.gpg diff --git a/internal/pipeline/sign/testdata/gnupg/trustdb.gpg b/internal/pipe/sign/testdata/gnupg/trustdb.gpg similarity index 100% rename from internal/pipeline/sign/testdata/gnupg/trustdb.gpg rename to internal/pipe/sign/testdata/gnupg/trustdb.gpg diff --git a/internal/pipeline/snapcraft/snapcraft.go b/internal/pipe/snapcraft/snapcraft.go similarity index 97% rename from internal/pipeline/snapcraft/snapcraft.go rename to internal/pipe/snapcraft/snapcraft.go index cd7cc8895..09b3e9871 100644 --- a/internal/pipeline/snapcraft/snapcraft.go +++ b/internal/pipe/snapcraft/snapcraft.go @@ -15,7 +15,7 @@ import ( "github.com/goreleaser/goreleaser/internal/artifact" "github.com/goreleaser/goreleaser/internal/linux" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/semerrgroup" "github.com/goreleaser/goreleaser/internal/tmpl" "github.com/goreleaser/goreleaser/pkg/context" @@ -70,7 +70,7 @@ func (Pipe) Default(ctx *context.Context) error { // Run the pipe func (Pipe) Run(ctx *context.Context) error { if ctx.Config.Snapcraft.Summary == "" && ctx.Config.Snapcraft.Description == "" { - return pipeline.Skip("no summary nor description were provided") + return pipe.Skip("no summary nor description were provided") } if ctx.Config.Snapcraft.Summary == "" { return ErrNoSummary diff --git a/internal/pipeline/snapcraft/snapcraft_test.go b/internal/pipe/snapcraft/snapcraft_test.go similarity index 97% rename from internal/pipeline/snapcraft/snapcraft_test.go rename to internal/pipe/snapcraft/snapcraft_test.go index 8e34f801c..90c3e78d0 100644 --- a/internal/pipeline/snapcraft/snapcraft_test.go +++ b/internal/pipe/snapcraft/snapcraft_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" "github.com/stretchr/testify/assert" @@ -27,7 +27,7 @@ func TestRunPipeMissingInfo(t *testing.T) { ErrNoDescription: { Summary: "dummy summary", }, - pipeline.Skip("no summary nor description were provided"): {}, + pipe.Skip("no summary nor description were provided"): {}, } { t.Run(fmt.Sprintf("testing if %v happens", eerr), func(t *testing.T) { var ctx = &context.Context{ diff --git a/internal/pipeline/snapshot/snapshot.go b/internal/pipe/snapshot/snapshot.go similarity index 100% rename from internal/pipeline/snapshot/snapshot.go rename to internal/pipe/snapshot/snapshot.go diff --git a/internal/pipeline/snapshot/snapshot_test.go b/internal/pipe/snapshot/snapshot_test.go similarity index 100% rename from internal/pipeline/snapshot/snapshot_test.go rename to internal/pipe/snapshot/snapshot_test.go diff --git a/internal/pipeline/pipeline.go b/internal/pipeline/pipeline.go index 9892764c9..80dd6c137 100644 --- a/internal/pipeline/pipeline.go +++ b/internal/pipeline/pipeline.go @@ -1,39 +1,60 @@ // Package pipeline provides generic erros for pipes to use. package pipeline -// ErrSnapshotEnabled happens when goreleaser is running in snapshot mode. -// It usually means that publishing and maybe some validations were skipped. -var ErrSnapshotEnabled = Skip("disabled during snapshot mode") +import ( + "fmt" -// ErrSkipPublishEnabled happens if --skip-publish is set. -// It means that the part of a Piper that publishes its artifacts was not run. -var ErrSkipPublishEnabled = Skip("publishing is disabled") + "github.com/goreleaser/goreleaser/internal/pipe/archive" + "github.com/goreleaser/goreleaser/internal/pipe/artifactory" + "github.com/goreleaser/goreleaser/internal/pipe/before" + "github.com/goreleaser/goreleaser/internal/pipe/brew" + "github.com/goreleaser/goreleaser/internal/pipe/build" + "github.com/goreleaser/goreleaser/internal/pipe/changelog" + "github.com/goreleaser/goreleaser/internal/pipe/checksums" + "github.com/goreleaser/goreleaser/internal/pipe/defaults" + "github.com/goreleaser/goreleaser/internal/pipe/dist" + "github.com/goreleaser/goreleaser/internal/pipe/docker" + "github.com/goreleaser/goreleaser/internal/pipe/effectiveconfig" + "github.com/goreleaser/goreleaser/internal/pipe/env" + "github.com/goreleaser/goreleaser/internal/pipe/git" + "github.com/goreleaser/goreleaser/internal/pipe/nfpm" + "github.com/goreleaser/goreleaser/internal/pipe/put" + "github.com/goreleaser/goreleaser/internal/pipe/release" + "github.com/goreleaser/goreleaser/internal/pipe/s3" + "github.com/goreleaser/goreleaser/internal/pipe/scoop" + "github.com/goreleaser/goreleaser/internal/pipe/sign" + "github.com/goreleaser/goreleaser/internal/pipe/snapcraft" + "github.com/goreleaser/goreleaser/pkg/context" +) -// ErrSkipSignEnabled happens if --skip-sign is set. -// It means that the part of a Piper that signs some things was not run. -var ErrSkipSignEnabled = Skip("artifact signing is disabled") +// Piper defines a pipe, which can be part of a pipeline (a serie of pipes). +type Piper interface { + fmt.Stringer -// ErrSkipValidateEnabled happens if --skip-validate is set. -// It means that the part of a Piper that validates some things was not run. -var ErrSkipValidateEnabled = Skip("validation is disabled") - -// IsSkip returns true if the error is an ErrSkip -func IsSkip(err error) bool { - _, ok := err.(ErrSkip) - return ok + // Run the pipe + Run(ctx *context.Context) error } -// ErrSkip occurs when a pipe is skipped for some reason -type ErrSkip struct { - reason string -} - -// Error implements the error interface. returns the reason the pipe was skipped -func (e ErrSkip) Error() string { - return e.reason -} - -// Skip skips this pipe with the given reason -func Skip(reason string) ErrSkip { - return ErrSkip{reason: reason} +// Pipeline contains all pipe implementations in order +var Pipeline = []Piper{ + defaults.Pipe{}, // load default configs + before.Pipe{}, // run global hooks before build + dist.Pipe{}, // ensure ./dist is clean + git.Pipe{}, // get and validate git repo state + effectiveconfig.Pipe{}, // writes the actual config (with defaults et al set) to dist + changelog.Pipe{}, // builds the release changelog + env.Pipe{}, // load and validate environment variables + build.Pipe{}, // build + archive.Pipe{}, // archive in tar.gz, zip or binary (which does no archiving at all) + nfpm.Pipe{}, // archive via fpm (deb, rpm) using "native" go impl + snapcraft.Pipe{}, // archive via snapcraft (snap) + checksums.Pipe{}, // checksums of the files + sign.Pipe{}, // sign artifacts + docker.Pipe{}, // create and push docker images + artifactory.Pipe{}, // push to artifactory + put.Pipe{}, // upload to http server + s3.Pipe{}, // push to s3/minio + release.Pipe{}, // release to github + brew.Pipe{}, // push to brew tap + scoop.Pipe{}, // push to scoop bucket } diff --git a/internal/testlib/skip.go b/internal/testlib/skip.go index c240ee226..61200143f 100644 --- a/internal/testlib/skip.go +++ b/internal/testlib/skip.go @@ -3,12 +3,12 @@ package testlib import ( "testing" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/stretchr/testify/assert" ) // AssertSkipped asserts that a pipe was skipped func AssertSkipped(t *testing.T, err error) { - _, ok := err.(pipeline.ErrSkip) - assert.True(t, ok, "expected a pipeline.ErrSkip but got %v", err) + _, ok := err.(pipe.ErrSkip) + assert.True(t, ok, "expected a pipe.ErrSkip but got %v", err) } diff --git a/internal/testlib/skip_test.go b/internal/testlib/skip_test.go index 9acd3a891..8be128390 100644 --- a/internal/testlib/skip_test.go +++ b/internal/testlib/skip_test.go @@ -3,9 +3,9 @@ package testlib import ( "testing" - "github.com/goreleaser/goreleaser/internal/pipeline" + "github.com/goreleaser/goreleaser/internal/pipe" ) func TestAssertSkipped(t *testing.T) { - AssertSkipped(t, pipeline.Skip("skip")) + AssertSkipped(t, pipe.Skip("skip")) } diff --git a/main.go b/main.go index a9bf59e3a..edce47af7 100644 --- a/main.go +++ b/main.go @@ -13,27 +13,8 @@ import ( "github.com/caarlos0/ctrlc" "github.com/fatih/color" + "github.com/goreleaser/goreleaser/internal/pipe" "github.com/goreleaser/goreleaser/internal/pipeline" - "github.com/goreleaser/goreleaser/internal/pipeline/archive" - "github.com/goreleaser/goreleaser/internal/pipeline/artifactory" - "github.com/goreleaser/goreleaser/internal/pipeline/before" - "github.com/goreleaser/goreleaser/internal/pipeline/brew" - "github.com/goreleaser/goreleaser/internal/pipeline/build" - "github.com/goreleaser/goreleaser/internal/pipeline/changelog" - "github.com/goreleaser/goreleaser/internal/pipeline/checksums" - "github.com/goreleaser/goreleaser/internal/pipeline/defaults" - "github.com/goreleaser/goreleaser/internal/pipeline/dist" - "github.com/goreleaser/goreleaser/internal/pipeline/docker" - "github.com/goreleaser/goreleaser/internal/pipeline/effectiveconfig" - "github.com/goreleaser/goreleaser/internal/pipeline/env" - "github.com/goreleaser/goreleaser/internal/pipeline/git" - "github.com/goreleaser/goreleaser/internal/pipeline/nfpm" - "github.com/goreleaser/goreleaser/internal/pipeline/put" - "github.com/goreleaser/goreleaser/internal/pipeline/release" - "github.com/goreleaser/goreleaser/internal/pipeline/s3" - "github.com/goreleaser/goreleaser/internal/pipeline/scoop" - "github.com/goreleaser/goreleaser/internal/pipeline/sign" - "github.com/goreleaser/goreleaser/internal/pipeline/snapcraft" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -44,37 +25,6 @@ var ( date = "unknown" ) -var pipes = []Piper{ - defaults.Pipe{}, // load default configs - before.Pipe{}, // run global hooks before build - dist.Pipe{}, // ensure ./dist is clean - git.Pipe{}, // get and validate git repo state - effectiveconfig.Pipe{}, // writes the actual config (with defaults et al set) to dist - changelog.Pipe{}, // builds the release changelog - env.Pipe{}, // load and validate environment variables - build.Pipe{}, // build - archive.Pipe{}, // archive in tar.gz, zip or binary (which does no archiving at all) - nfpm.Pipe{}, // archive via fpm (deb, rpm) using "native" go impl - snapcraft.Pipe{}, // archive via snapcraft (snap) - checksums.Pipe{}, // checksums of the files - sign.Pipe{}, // sign artifacts - docker.Pipe{}, // create and push docker images - artifactory.Pipe{}, // push to artifactory - put.Pipe{}, // upload to http server - s3.Pipe{}, // push to s3/minio - release.Pipe{}, // release to github - brew.Pipe{}, // push to brew tap - scoop.Pipe{}, // push to scoop bucket -} - -// Piper defines a pipe, which can be part of a pipeline (a serie of pipes). -type Piper interface { - fmt.Stringer - - // Run the pipe - Run(ctx *context.Context) error -} - type releaseOptions struct { Config string ReleaseNotes string @@ -184,7 +134,7 @@ func releaseProject(options releaseOptions) error { func doRelease(ctx *context.Context) error { defer func() { cli.Default.Padding = 3 }() var release = func() error { - for _, pipe := range pipes { + for _, pipe := range pipeline.Pipeline { cli.Default.Padding = 3 log.Infof(color.New(color.Bold).Sprint(strings.ToUpper(pipe.String()))) cli.Default.Padding = 6 @@ -201,7 +151,7 @@ func handle(err error) error { if err == nil { return nil } - if pipeline.IsSkip(err) { + if pipe.IsSkip(err) { log.WithField("reason", err.Error()).Warn("skipped") return nil } diff --git a/www/static/deps.svg b/www/static/deps.svg index 83abf18ba..6fbe3d8f8 100644 --- a/www/static/deps.svg +++ b/www/static/deps.svg @@ -4,1078 +4,1096 @@ - - + + godep - + _0 - -github.com/goreleaser/goreleaser + +github.com/goreleaser/goreleaser _1 - -github.com/goreleaser/goreleaser/internal/pipeline + +github.com/goreleaser/goreleaser/internal/pipe _0->_1 - - + + _2 - -github.com/goreleaser/goreleaser/internal/pipeline/archive + +github.com/goreleaser/goreleaser/internal/pipeline _0->_2 - - + + _3 - -github.com/goreleaser/goreleaser/internal/pipeline/artifactory + +github.com/goreleaser/goreleaser/pkg/config _0->_3 - - + + _4 - -github.com/goreleaser/goreleaser/internal/pipeline/before + +github.com/goreleaser/goreleaser/pkg/context _0->_4 - - + + - - -_5 - -github.com/goreleaser/goreleaser/internal/pipeline/brew - - - -_0->_5 - - - - - -_6 - -github.com/goreleaser/goreleaser/internal/pipeline/build - - - -_0->_6 - - - - - -_7 - -github.com/goreleaser/goreleaser/internal/pipeline/changelog - - - -_0->_7 - - - - - -_8 - -github.com/goreleaser/goreleaser/internal/pipeline/checksums - - - -_0->_8 - - - - - -_9 - -github.com/goreleaser/goreleaser/internal/pipeline/defaults - - - -_0->_9 - - - - - -_10 - -github.com/goreleaser/goreleaser/internal/pipeline/dist - - - -_0->_10 - - - - - -_11 - -github.com/goreleaser/goreleaser/internal/pipeline/docker - - - -_0->_11 - - - - - -_12 - -github.com/goreleaser/goreleaser/internal/pipeline/effectiveconfig - - - -_0->_12 - - - - - -_13 - -github.com/goreleaser/goreleaser/internal/pipeline/env - - - -_0->_13 - - + + +_2->_4 + + _14 - -github.com/goreleaser/goreleaser/internal/pipeline/git + +github.com/goreleaser/goreleaser/internal/pipe/archive - - -_0->_14 - - - - - -_15 - -github.com/goreleaser/goreleaser/internal/pipeline/nfpm - - - -_0->_15 - - + + +_2->_14 + + _16 - -github.com/goreleaser/goreleaser/internal/pipeline/put + +github.com/goreleaser/goreleaser/internal/pipe/artifactory - - -_0->_16 - - + + +_2->_16 + + _17 - -github.com/goreleaser/goreleaser/internal/pipeline/release + +github.com/goreleaser/goreleaser/internal/pipe/before - - -_0->_17 - - + + +_2->_17 + + _18 - -github.com/goreleaser/goreleaser/internal/pipeline/s3 + +github.com/goreleaser/goreleaser/internal/pipe/brew - - -_0->_18 - - + + +_2->_18 + + _19 - -github.com/goreleaser/goreleaser/internal/pipeline/scoop + +github.com/goreleaser/goreleaser/internal/pipe/build - - -_0->_19 - - + + +_2->_19 + + _20 - -github.com/goreleaser/goreleaser/internal/pipeline/sign + +github.com/goreleaser/goreleaser/internal/pipe/changelog - - -_0->_20 - - + + +_2->_20 + + _21 - -github.com/goreleaser/goreleaser/internal/pipeline/snapcraft + +github.com/goreleaser/goreleaser/internal/pipe/checksums - - -_0->_21 - - + + +_2->_21 + + _22 - -github.com/goreleaser/goreleaser/pkg/config + +github.com/goreleaser/goreleaser/internal/pipe/defaults - - -_0->_22 - - + + +_2->_22 + + _23 - -github.com/goreleaser/goreleaser/pkg/context - - - -_0->_23 - - + +github.com/goreleaser/goreleaser/internal/pipe/docker - + _2->_23 - - + + _24 - -github.com/goreleaser/goreleaser/internal/artifact + +github.com/goreleaser/goreleaser/internal/pipe/env - + _2->_24 - - - - - -_26 - -github.com/goreleaser/goreleaser/internal/tmpl - - - -_2->_26 - - - - - -_33 - -github.com/goreleaser/goreleaser/pkg/archive - - - -_2->_33 - - - - - -_3->_1 - - - - - -_3->_23 - - - - - -_30 - -github.com/goreleaser/goreleaser/internal/http - - - -_3->_30 - - - - - -_4->_23 - - - - - -_5->_1 - - - - - -_5->_22 - - - - - -_5->_23 - - - - - -_5->_24 - - - - - -_5->_26 - - - - - -_28 - -github.com/goreleaser/goreleaser/internal/client - - - -_5->_28 - - - - - -_6->_22 - - - - - -_6->_23 - - + + _25 - -github.com/goreleaser/goreleaser/internal/builders/golang + +github.com/goreleaser/goreleaser/internal/pipe/nfpm - - -_6->_25 - - - - - -_6->_26 - - + + +_2->_25 + + _27 - -github.com/goreleaser/goreleaser/pkg/build + +github.com/goreleaser/goreleaser/internal/pipe/release - - -_6->_27 - - + + +_2->_27 + + - - -_31 - -github.com/goreleaser/goreleaser/internal/semerrgroup + + +_28 + +github.com/goreleaser/goreleaser/internal/pipe/s3 - - -_6->_31 - - - - - -_7->_1 - - - - - -_7->_23 - - + + +_2->_28 + + _29 - -github.com/goreleaser/goreleaser/internal/git + +github.com/goreleaser/goreleaser/internal/pipe/scoop - - -_7->_29 - - + + +_2->_29 + + - - -_8->_23 - - + + +_30 + +github.com/goreleaser/goreleaser/internal/pipe/sign - - -_8->_24 - - + + +_2->_30 + + - - -_8->_26 - - + + +_31 + +github.com/goreleaser/goreleaser/internal/pipe/snapcraft - - -_8->_31 - - + + +_2->_31 + + - - -_9->_2 - - + + +_33 + +github.com/goreleaser/goreleaser/internal/pipe/dist - - -_9->_3 - - - - - -_9->_5 - - - - - -_9->_6 - - - - - -_9->_8 - - - - - -_9->_11 - - - - - -_9->_13 - - - - - -_9->_15 - - - - - -_9->_17 - - - - - -_9->_18 - - - - - -_9->_19 - - - - - -_9->_20 - - - - - -_9->_21 - - - - - -_9->_23 - - + + +_2->_33 + + _34 - -github.com/goreleaser/goreleaser/internal/pipeline/project + +github.com/goreleaser/goreleaser/internal/pipe/effectiveconfig - - -_9->_34 - - + + +_2->_34 + + _35 - -github.com/goreleaser/goreleaser/internal/pipeline/snapshot + +github.com/goreleaser/goreleaser/internal/pipe/git - - -_9->_35 - - - - - -_10->_23 - - - - - -_11->_1 - - - - - -_11->_22 - - - - - -_11->_23 - - - - - -_11->_24 - - - - - -_11->_26 - - - - - -_11->_31 - - - - - -_12->_23 - - - - - -_13->_1 - - - - - -_13->_23 - - - - - -_14->_1 - - - - - -_14->_23 - - - - - -_14->_26 - - - - - -_14->_29 - - - - - -_15->_1 - - - - - -_15->_22 - - - - - -_15->_23 - - - - - -_15->_24 - - - - - -_15->_26 - - - - - -_15->_31 - - - - - -_32 - -github.com/goreleaser/goreleaser/internal/linux - - - -_15->_32 - - - - - -_16->_1 - - - - - -_16->_23 - - - - - -_16->_30 - - - - - -_17->_1 - - - - - -_17->_22 - - - - - -_17->_23 - - - - - -_17->_24 - - - - - -_17->_28 - - - - - -_17->_29 - - - - - -_17->_31 - - - - - -_18->_1 - - - - - -_18->_22 - - - - - -_18->_23 - - - - - -_18->_24 - - - - - -_18->_26 - - - - - -_18->_31 - - - - - -_19->_1 - - - - - -_19->_23 - - - - - -_19->_24 - - - - - -_19->_26 - - - - - -_19->_28 - - - - - -_20->_1 - - - - - -_20->_23 - - - - - -_20->_24 - - - - - -_21->_1 - - - - - -_21->_23 - - - - + -_21->_24 - - - - - -_21->_26 - - - - - -_21->_31 - - - - - -_21->_32 - - - - - -_23->_22 - - - - - -_23->_24 - - - - - -_25->_22 - - - - - -_25->_23 - - - - - -_25->_24 - - - - - -_25->_26 - - - - - -_25->_27 - - - - - -_26->_23 - - - - - -_26->_24 - - - - - -_27->_22 - - - - - -_27->_23 - - - - - -_28->_22 - - - - - -_28->_23 - - - - - -_28->_26 - - - - - -_30->_1 - - - - - -_30->_22 - - - - - -_30->_23 - - - - - -_30->_24 - - - - - -_30->_31 - - +_2->_35 + + _36 - -github.com/goreleaser/goreleaser/pkg/archive/tar + +github.com/goreleaser/goreleaser/internal/pipe/put - + + +_2->_36 + + + + + +_4->_3 + + + + + +_5 + +github.com/goreleaser/goreleaser/internal/artifact + + + +_4->_5 + + + + + +_6 + +github.com/goreleaser/goreleaser/internal/builders/golang + + + +_6->_3 + + + + + +_6->_4 + + + + + +_6->_5 + + + + + +_7 + +github.com/goreleaser/goreleaser/internal/tmpl + + + +_6->_7 + + + + + +_8 + +github.com/goreleaser/goreleaser/pkg/build + + + +_6->_8 + + + + + +_7->_4 + + + + -_33->_36 - - +_7->_5 + + + + + +_8->_3 + + + + + +_8->_4 + + + + + +_9 + +github.com/goreleaser/goreleaser/internal/client + + + +_9->_3 + + + + + +_9->_4 + + + + + +_9->_7 + + + + + +_10 + +github.com/goreleaser/goreleaser/internal/git + + + +_11 + +github.com/goreleaser/goreleaser/internal/http + + + +_11->_1 + + + + + +_11->_3 + + + + + +_11->_4 + + + + + +_11->_5 + + + + + +_12 + +github.com/goreleaser/goreleaser/internal/semerrgroup + + + +_11->_12 + + + + + +_13 + +github.com/goreleaser/goreleaser/internal/linux + + + +_14->_4 + + + + + +_14->_5 + + + + + +_14->_7 + + + + + +_15 + +github.com/goreleaser/goreleaser/pkg/archive + + + +_14->_15 + + _37 - -github.com/goreleaser/goreleaser/pkg/archive/zip + +github.com/goreleaser/goreleaser/pkg/archive/tar - - -_33->_37 - - + + +_15->_37 + + - + + +_38 + +github.com/goreleaser/goreleaser/pkg/archive/zip + + + +_15->_38 + + + + + +_16->_1 + + + + + +_16->_4 + + + + + +_16->_11 + + + + + +_17->_4 + + + + + +_18->_1 + + + + + +_18->_3 + + + + + +_18->_4 + + + + + +_18->_5 + + + + + +_18->_7 + + + + + +_18->_9 + + + + + +_19->_3 + + + + + +_19->_4 + + + + + +_19->_6 + + + + + +_19->_7 + + + + + +_19->_8 + + + + + +_19->_12 + + + + + +_20->_1 + + + + + +_20->_4 + + + + + +_20->_10 + + + + + +_21->_4 + + + + + +_21->_5 + + + + + +_21->_7 + + + + + +_21->_12 + + + + + +_22->_4 + + + + + +_22->_14 + + + + + +_22->_16 + + + + + +_22->_18 + + + + + +_22->_19 + + + + + +_22->_21 + + + + + +_22->_23 + + + + + +_22->_24 + + + + + +_22->_25 + + + + + +_26 + +github.com/goreleaser/goreleaser/internal/pipe/project + + + +_22->_26 + + + + + +_22->_27 + + + + + +_22->_28 + + + + + +_22->_29 + + + + + +_22->_30 + + + + + +_22->_31 + + + + + +_32 + +github.com/goreleaser/goreleaser/internal/pipe/snapshot + + + +_22->_32 + + + + + +_23->_1 + + + + + +_23->_3 + + + + + +_23->_4 + + + + + +_23->_5 + + + + + +_23->_7 + + + + + +_23->_12 + + + + + +_24->_1 + + + + + +_24->_4 + + + + + +_25->_1 + + + + + +_25->_3 + + + + + +_25->_4 + + + + + +_25->_5 + + + + + +_25->_7 + + + + + +_25->_12 + + + + + +_25->_13 + + + + + +_26->_4 + + + + + +_27->_1 + + + + + +_27->_3 + + + + + +_27->_4 + + + + + +_27->_5 + + + + + +_27->_9 + + + + + +_27->_10 + + + + + +_27->_12 + + + + + +_28->_1 + + + + + +_28->_3 + + + + + +_28->_4 + + + + + +_28->_5 + + + + + +_28->_7 + + + + + +_28->_12 + + + + -_34->_23 - - +_29->_1 + + - - -_35->_23 - - + + +_29->_4 + + + + + +_29->_5 + + + + + +_29->_7 + + + + + +_29->_9 + + + + + +_30->_1 + + + + + +_30->_4 + + + + + +_30->_5 + + + + + +_31->_1 + + + + + +_31->_4 + + + + + +_31->_5 + + + + + +_31->_7 + + + + + +_31->_12 + + + + + +_31->_13 + + + + + +_32->_4 + + + + + +_33->_4 + + + + + +_34->_4 + + + + + +_35->_1 + + + + + +_35->_4 + + + + + +_35->_7 + + + + + +_35->_10 + + + + + +_36->_1 + + + + + +_36->_4 + + + + + +_36->_11 + +