mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
aace3d4813
closes #10
35 lines
640 B
Go
35 lines
640 B
Go
package context
|
|
|
|
import "github.com/goreleaser/goreleaser/config"
|
|
|
|
// GitInfo includes tags and diffs used in some point
|
|
type GitInfo struct {
|
|
CurrentTag string
|
|
PreviousTag string
|
|
Diff string
|
|
}
|
|
|
|
// Repo owner/name pair
|
|
type Repo struct {
|
|
Owner, Name string
|
|
}
|
|
|
|
// Context carries along some data through the pipes
|
|
type Context struct {
|
|
Config config.Project
|
|
Token string
|
|
Git GitInfo
|
|
ReleaseRepo Repo
|
|
BrewRepo Repo
|
|
Archives map[string]string
|
|
Version string
|
|
}
|
|
|
|
// New context
|
|
func New(config config.Project) *Context {
|
|
return &Context{
|
|
Config: config,
|
|
Archives: map[string]string{},
|
|
}
|
|
}
|