You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-09-16 09:26:52 +02:00
refactor: Simplified if checks for configured artifactories
- if l := len(ctx.Config.Artifactories); l == 0 { + if len(ctx.Config.Artifactories) == 0 {
This commit is contained in:
@@ -62,7 +62,7 @@ func (Pipe) String() string {
|
|||||||
|
|
||||||
// Default sets the pipe defaults
|
// Default sets the pipe defaults
|
||||||
func (Pipe) Default(ctx *context.Context) error {
|
func (Pipe) Default(ctx *context.Context) error {
|
||||||
if l := len(ctx.Config.Artifactories); l == 0 {
|
if len(ctx.Config.Artifactories) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ func (Pipe) Default(ctx *context.Context) error {
|
|||||||
//
|
//
|
||||||
// Docs: https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-Example-DeployinganArtifact
|
// Docs: https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-Example-DeployinganArtifact
|
||||||
func (Pipe) Run(ctx *context.Context) error {
|
func (Pipe) Run(ctx *context.Context) error {
|
||||||
if l := len(ctx.Config.Artifactories); l == 0 {
|
if len(ctx.Config.Artifactories) == 0 {
|
||||||
return pipeline.Skip("artifactory section is not configured")
|
return pipeline.Skip("artifactory section is not configured")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user