github.com/szyn/goreleaser@v0.76.1-0.20180517112710-333da09a1297/pipeline/snapshot/snapshot.go (about)

     1  // Package snapshot provides the snapshoting functionality to goreleaser.
     2  package snapshot
     3  
     4  import "github.com/goreleaser/goreleaser/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  }