You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-03 00:57:43 +02:00
wip ctx
This commit is contained in:
32
pipeline/git/git.go
Normal file
32
pipeline/git/git.go
Normal file
@ -0,0 +1,32 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user