You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	fix: snapshot should run before before hooks (#4250)
Otherwise .Version will be wrong. closes #4247
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							ced7a0ab82
						
					
				
				
					commit
					cb093219c1
				
			| @@ -9,7 +9,7 @@ import ( | ||||
| 	"github.com/goreleaser/goreleaser/pkg/context" | ||||
| ) | ||||
|  | ||||
| // Pipe for checksums. | ||||
| // Pipe for setting up the snapshot feature.. | ||||
| type Pipe struct{} | ||||
|  | ||||
| func (Pipe) String() string                 { return "snapshotting" } | ||||
| @@ -26,7 +26,7 @@ func (Pipe) Default(ctx *context.Context) error { | ||||
| func (Pipe) Run(ctx *context.Context) error { | ||||
| 	name, err := tmpl.New(ctx).Apply(ctx.Config.Snapshot.NameTemplate) | ||||
| 	if err != nil { | ||||
| 		return fmt.Errorf("failed to generate snapshot name: %w", err) | ||||
| 		return fmt.Errorf("failed to parse snapshot name: %w", err) | ||||
| 	} | ||||
| 	if name == "" { | ||||
| 		return fmt.Errorf("empty snapshot name") | ||||
|   | ||||
| @@ -59,10 +59,10 @@ var BuildPipeline = []Piper{ | ||||
| 	semver.Pipe{}, | ||||
| 	// load default configs | ||||
| 	defaults.Pipe{}, | ||||
| 	// run global hooks before build | ||||
| 	before.Pipe{}, | ||||
| 	// snapshot version handling | ||||
| 	snapshot.Pipe{}, | ||||
| 	// run global hooks before build | ||||
| 	before.Pipe{}, | ||||
| 	// ensure ./dist is clean | ||||
| 	dist.Pipe{}, | ||||
| 	// setup gomod-related stuff | ||||
|   | ||||
		Reference in New Issue
	
	Block a user