You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	logging the reasons why a pipe is being skipped
This commit is contained in:
		| @@ -103,7 +103,12 @@ func doRun(ctx *context.Context, client client.Client) error { | ||||
| 			Name:  ss[1], | ||||
| 		} | ||||
| 	} | ||||
| 	if ctx.Config.Brew.GitHub.Name == "" || !ctx.Publish { | ||||
| 	if !ctx.Publish { | ||||
| 		log.Println("Skipped because --skip-publish is set") | ||||
| 		return nil | ||||
| 	} | ||||
| 	if ctx.Config.Brew.GitHub.Name == "" { | ||||
| 		log.Println("Skipped because brew section is not configured") | ||||
| 		return nil | ||||
| 	} | ||||
| 	path := filepath.Join(ctx.Config.Brew.Folder, ctx.Config.Build.Binary+".rb") | ||||
|   | ||||
							
								
								
									
										6
									
								
								pipeline/env/env.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								pipeline/env/env.go
									
									
									
									
										vendored
									
									
								
							| @@ -4,13 +4,14 @@ package env | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"log" | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/goreleaser/goreleaser/context" | ||||
| ) | ||||
|  | ||||
| // ErrMissingToken indicates an error when GITHUB_TOKEN is missing in the environment | ||||
| var ErrMissingToken = errors.New("Missing GITHUB_TOKEN") | ||||
| var ErrMissingToken = errors.New("missing GITHUB_TOKEN") | ||||
|  | ||||
| // Pipe for env | ||||
| type Pipe struct{} | ||||
| @@ -22,10 +23,11 @@ func (Pipe) Description() string { | ||||
|  | ||||
| // Run the pipe | ||||
| func (Pipe) Run(ctx *context.Context) (err error) { | ||||
| 	ctx.Token = os.Getenv("GITHUB_TOKEN") | ||||
| 	if !ctx.Validate { | ||||
| 		log.Println("Skipped validations because --skip-validate is set") | ||||
| 		return nil | ||||
| 	} | ||||
| 	ctx.Token = os.Getenv("GITHUB_TOKEN") | ||||
| 	if ctx.Token == "" { | ||||
| 		return ErrMissingToken | ||||
| 	} | ||||
|   | ||||
| @@ -4,6 +4,7 @@ package git | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"log" | ||||
| 	"regexp" | ||||
| 	"strings" | ||||
|  | ||||
| @@ -65,6 +66,7 @@ func (Pipe) Run(ctx *context.Context) (err error) { | ||||
| 	// removes usual `v` prefix | ||||
| 	ctx.Version = strings.TrimPrefix(tag, "v") | ||||
| 	if !ctx.Validate { | ||||
| 		log.Println("Skipped validation because --skip-validate is set") | ||||
| 		return nil | ||||
| 	} | ||||
| 	return validate(commit, tag, ctx.Version) | ||||
|   | ||||
| @@ -27,6 +27,7 @@ func (Pipe) Run(ctx *context.Context) error { | ||||
|  | ||||
| func doRun(ctx *context.Context, client client.Client) error { | ||||
| 	if !ctx.Publish { | ||||
| 		log.Println("Skipped because --skip-publish is set") | ||||
| 		return nil | ||||
| 	} | ||||
| 	log.Println("Creating or updating release", ctx.Git.CurrentTag, "on", ctx.Config.Release.GitHub.String()) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user