1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-26 04:22:05 +02:00
Carlos Alexandro Becker ddec194c7e
wip ctx
2017-01-14 12:34:22 -02:00

33 lines
528 B
Go

package git
import "github.com/goreleaser/releaser/context"
// Pipe for brew deployment
type Pipe struct{}
// Name of the pipe
func (Pipe) Name() string {
return "Git"
}
// Run the pipe
func (Pipe) Run(context *context.Context) (err error) {
tag, err := currentTag()
if err != nil {
return
}
previous, err := previousTag(tag)
if err != nil {
return
}
log, err := log(previous, tag)
if err != nil {
return
}
context.Git.CurrentTag = tag
context.Git.PreviousTag = previous
context.Git.Diff = log
return
}