1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/pipeline/git/git.go
2017-01-14 15:14:35 -02:00

35 lines
556 B
Go

package git
import "github.com/goreleaser/releaser/context"
// Pipe for brew deployment
type Pipe struct{}
// Name 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
}