Documentation ¶
Index ¶
- func LoadEnvFile(filename string) (map[string]string, error)
- type Archive
- type ArchiveFileInfo
- type ArchiveSettings
- type ArchiveType
- type Archives
- type Build
- type BuildArch
- type BuildArchPath
- type BuildOs
- type BuildSettings
- type Builds
- type Config
- type GoSettings
- type Plugin
- type Release
- type ReleaseNotesGroup
- type ReleaseNotesSettings
- type ReleaseSettings
- type Releases
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Archive ¶
type Archive struct { // Glob of Build paths to archive. Multiple paths will be ANDed. Paths []string `json:"paths"` ArchiveSettings ArchiveSettings `json:"archive_settings"` PathsCompiled matchers.Matcher `json:"-"` ArchsCompiled []BuildArchPath `json:"-"` }
type ArchiveFileInfo ¶ added in v0.53.0
type ArchiveSettings ¶
type ArchiveSettings struct { Type ArchiveType `json:"type"` BinaryDir string `json:"binary_dir"` NameTemplate string `json:"name_template"` ExtraFiles []ArchiveFileInfo `json:"extra_files"` Replacements map[string]string `json:"replacements"` Plugin Plugin `json:"plugin"` // CustomSettings is archive type specific metadata. // See in the documentation for the configured archive type. CustomSettings map[string]any `json:"custom_settings"` ReplacementsCompiled *strings.Replacer `json:"-"` }
func (*ArchiveSettings) Init ¶
func (a *ArchiveSettings) Init() error
type ArchiveType ¶
type ArchiveType struct { Format string `json:"format"` Extension string `json:"extension"` FormatParsed archiveformats.Format `json:"-"` }
func (*ArchiveType) Init ¶
func (a *ArchiveType) Init() error
func (ArchiveType) IsZero ¶
func (a ArchiveType) IsZero() bool
IsZero is needed to get the shallow merge correct.
type Build ¶
type Build struct { Path string `json:"path"` Os []BuildOs `json:"os"` BuildSettings BuildSettings `json:"build_settings"` }
type BuildArch ¶
type BuildArch struct { Goarch string `json:"goarch"` BuildSettings BuildSettings `json:"build_settings"` // Tree navigation. Build *Build `json:"-"` Os *BuildOs `json:"-"` }
func (BuildArch) BinaryPath ¶
BinaryPath returns the path to the built binary starting below /builds.
type BuildArchPath ¶
type BuildOs ¶
type BuildOs struct { Goos string `json:"goos"` Archs []BuildArch `json:"archs"` BuildSettings BuildSettings `json:"build_settings"` // Tree navigation. Build *Build `json:"-"` }
type BuildSettings ¶
type BuildSettings struct { Binary string `json:"binary"` Env []string `json:"env"` Ldflags string `json:"ldflags"` Flags []string `json:"flags"` GoSettings GoSettings `json:"go_settings"` }
func (BuildSettings) Fields ¶
func (b BuildSettings) Fields() logg.Fields
Fields is used by the logging framework.
type Config ¶
type Config struct { // A bucket for anchors that defines reusable YAML fragments. Definitions map[string]any ` json:"definitions"` Project string `json:"project"` ArchiveAliasReplacements map[string]string `json:"archive_alias_replacements"` GoSettings GoSettings `json:"go_settings"` Builds Builds `json:"builds"` Archives Archives `json:"archives"` Releases Releases `json:"releases"` BuildSettings BuildSettings `json:"build_settings"` ArchiveSettings ArchiveSettings `json:"archive_settings"` ReleaseSettings ReleaseSettings `json:"release_settings"` }
func DecodeAndApplyDefaults ¶
DecodeAndApplyDefaults first expand any environment variables in r (${var}), decodes it and applies default values.
type GoSettings ¶
type Plugin ¶
type Release ¶
type Release struct { // Paths with Glob of releases paths to release. Multiple paths will be ANDed. Paths []string `json:"paths"` // Path is the directory below /dist/releases where the release artifacts gets stored. // This must be unique for each release within one configuration file. Path string `json:"path"` ReleaseSettings ReleaseSettings `json:"release_settings"` PathsCompiled matchers.Matcher `json:"-"` // Builds matching Paths. ArchsCompiled []BuildArchPath `json:"-"` }
type ReleaseNotesGroup ¶ added in v0.9.0
type ReleaseNotesGroup struct { Title string `json:"title"` Regexp string `json:"regexp"` Ignore bool `json:"ignore"` Ordinal int `json:"ordinal"` RegexpCompiled matchers.Matcher `json:"-"` }
func (*ReleaseNotesGroup) Init ¶ added in v0.9.0
func (g *ReleaseNotesGroup) Init() error
type ReleaseNotesSettings ¶ added in v0.9.0
type ReleaseNotesSettings struct { Generate bool `json:"generate"` GenerateOnHost bool `json:"generate_on_host"` Filename string `json:"filename"` TemplateFilename string `json:"template_filename"` Groups []ReleaseNotesGroup `json:"groups"` // Can be used to collapse releases with a few number (less than threshold) of changes into one title. ShortThreshold int `json:"short_threshold"` ShortTitle string `json:"short_title"` }
func (*ReleaseNotesSettings) Init ¶ added in v0.9.0
func (g *ReleaseNotesSettings) Init() error
type ReleaseSettings ¶
type ReleaseSettings struct { Type string `json:"type"` Name string `json:"name"` Repository string `json:"repository"` RepositoryOwner string `json:"repository_owner"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` ReleaseNotesSettings ReleaseNotesSettings `json:"release_notes_settings"` TypeParsed releasetypes.Type `json:"-"` }
func (*ReleaseSettings) Init ¶
func (r *ReleaseSettings) Init() error
Click to show internal directories.
Click to hide internal directories.