mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-19 12:12:26 +02:00
20 lines
458 B
Go
20 lines
458 B
Go
|
// Package project sets "high level" defaults related to the project.
|
||
|
package project
|
||
|
|
||
|
import "github.com/goreleaser/goreleaser/context"
|
||
|
|
||
|
// Pipe implemens defaulter to set the project name
|
||
|
type Pipe struct{}
|
||
|
|
||
|
func (Pipe) String() string {
|
||
|
return "project name"
|
||
|
}
|
||
|
|
||
|
// Default set project defaults
|
||
|
func (Pipe) Default(ctx *context.Context) error {
|
||
|
if ctx.Config.ProjectName == "" {
|
||
|
ctx.Config.ProjectName = ctx.Config.Release.GitHub.Name
|
||
|
}
|
||
|
return nil
|
||
|
}
|