github.1git.de/goreleaser/goreleaser@v0.92.0/internal/pipe/snapshot/snapshot.go (about)

     1  // Package snapshot provides the snapshoting functionality to goreleaser.
     2  package snapshot
     3  
     4  import "github.com/goreleaser/goreleaser/pkg/context"
     5  
     6  // Pipe for checksums
     7  type Pipe struct{}
     8  
     9  func (Pipe) String() string {
    10  	return "snapshoting"
    11  }
    12  
    13  // Default sets the pipe defaults
    14  func (Pipe) Default(ctx *context.Context) error {
    15  	if ctx.Config.Snapshot.NameTemplate == "" {
    16  		ctx.Config.Snapshot.NameTemplate = "SNAPSHOT-{{ .Commit }}"
    17  	}
    18  	return nil
    19  }