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 `toml:"paths"` ArchiveSettings ArchiveSettings `toml:"archive_settings"` PathsCompiled matchers.Matcher `toml:"-"` ArchsCompiled []BuildArchPath `toml:"-"` }
type ArchiveFileInfo ¶ added in v0.53.0
type ArchiveSettings ¶
type ArchiveSettings struct { Type ArchiveType `toml:"type"` BinaryDir string `toml:"binary_dir"` NameTemplate string `toml:"name_template"` ExtraFiles []ArchiveFileInfo `toml:"extra_files"` Replacements map[string]string `toml:"replacements"` Plugin Plugin `toml:"plugin"` // CustomSettings is archive type specific metadata. // See in the documentation for the configured archive type. CustomSettings map[string]any `toml:"custom_settings"` ReplacementsCompiled *strings.Replacer `toml:"-"` }
func (*ArchiveSettings) Init ¶
func (a *ArchiveSettings) Init() error
type ArchiveType ¶
type ArchiveType struct { Format string `toml:"format"` Extension string `toml:"extension"` FormatParsed archiveformats.Format `toml:"-"` }
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 `toml:"path"` Os []BuildOs `toml:"os"` BuildSettings BuildSettings `toml:"build_settings"` }
type BuildArch ¶
type BuildArch struct { Goarch string `toml:"goarch"` BuildSettings BuildSettings `toml:"build_settings"` // Tree navigation. Build *Build `toml:"-"` Os *BuildOs `toml:"-"` }
func (BuildArch) BinaryPath ¶
BinaryPath returns the path to the built binary starting below /builds.
type BuildArchPath ¶
type BuildOs ¶
type BuildOs struct { Goos string `toml:"goos"` Archs []BuildArch `toml:"archs"` BuildSettings BuildSettings `toml:"build_settings"` // Tree navigation. Build *Build `toml:"-"` }
type BuildSettings ¶
type BuildSettings struct { Binary string `toml:"binary"` Env []string `toml:"env"` Ldflags string `toml:"ldflags"` Flags []string `toml:"flags"` GoSettings GoSettings `toml:"go_settings"` }
func (BuildSettings) Fields ¶
func (b BuildSettings) Fields() logg.Fields
Fields is used by the logging framework.
type Config ¶
type Config struct { Project string `toml:"project"` GoSettings GoSettings `toml:"go_settings"` Builds Builds `toml:"builds"` Archives Archives `toml:"archives"` Releases Releases `toml:"releases"` BuildSettings BuildSettings `toml:"build_settings"` ArchiveSettings ArchiveSettings `toml:"archive_settings"` ReleaseSettings ReleaseSettings `toml:"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 `toml:"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 `toml:"path"` ReleaseSettings ReleaseSettings `toml:"release_settings"` PathsCompiled matchers.Matcher `toml:"-"` // Builds matching Paths. ArchsCompiled []BuildArchPath `toml:"-"` }
type ReleaseNotesGroup ¶ added in v0.9.0
type ReleaseNotesGroup struct { Title string `toml:"title"` Regexp string `toml:"regexp"` Ignore bool `toml:"ignore"` Ordinal int `toml:"ordinal"` RegexpCompiled matchers.Matcher `toml:"-"` }
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 `toml:"generate"` GenerateOnHost bool `toml:"generate_on_host"` Filename string `toml:"filename"` TemplateFilename string `toml:"template_filename"` Groups []ReleaseNotesGroup `toml:"groups"` // Can be used to collapse releases with a few number (less than threshold) of changes into one title. ShortThreshold int `toml:"short_threshold"` ShortTitle string `toml:"short_title"` }
func (*ReleaseNotesSettings) Init ¶ added in v0.9.0
func (g *ReleaseNotesSettings) Init() error
type ReleaseSettings ¶
type ReleaseSettings struct { Type string `toml:"type"` Name string `toml:"name"` Repository string `toml:"repository"` RepositoryOwner string `toml:"repository_owner"` Draft bool `toml:"draft"` Prerelease bool `toml:"prerelease"` ReleaseNotesSettings ReleaseNotesSettings `toml:"release_notes_settings"` TypeParsed releasetypes.Type `toml:"-"` }
func (*ReleaseSettings) Init ¶
func (r *ReleaseSettings) Init() error
Click to show internal directories.
Click to hide internal directories.