2017-12-06 00:18:47 -02:00
|
|
|
// Package snapshot provides the snapshoting functionality to goreleaser.
|
2017-12-02 19:53:19 -02:00
|
|
|
package snapshot
|
|
|
|
|
2017-12-06 00:18:47 -02:00
|
|
|
import "github.com/goreleaser/goreleaser/context"
|
2017-12-02 19:53:19 -02:00
|
|
|
|
|
|
|
// Pipe for checksums
|
|
|
|
type Pipe struct{}
|
|
|
|
|
|
|
|
func (Pipe) String() string {
|
2017-12-26 21:44:11 -02:00
|
|
|
return "snapshoting"
|
2017-12-02 19:53:19 -02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Default sets the pipe defaults
|
|
|
|
func (Pipe) Default(ctx *context.Context) error {
|
|
|
|
if ctx.Config.Snapshot.NameTemplate == "" {
|
|
|
|
ctx.Config.Snapshot.NameTemplate = "SNAPSHOT-{{ .Commit }}"
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|