1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-04-19 12:12:26 +02:00
2017-01-14 19:41:32 +01:00

35 lines
563 B
Go

package git
import "github.com/goreleaser/releaser/context"
// Pipe for brew deployment
type Pipe struct{}
// Description of the pipe
func (Pipe) Description() string {
return "Gathering Git data..."
}
// Run the pipe
func (Pipe) Run(ctx *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
}
ctx.Git = &context.GitInfo{
CurrentTag: tag,
PreviousTag: previous,
Diff: log,
}
return
}