Documentation ¶
Overview ¶
Package artifact provides the core artifact storage for goreleaser.
Index ¶
- Constants
- type Artifact
- type Artifacts
- func (artifacts *Artifacts) Add(a *Artifact)
- func (artifacts *Artifacts) Filter(filter Filter) Artifacts
- func (artifacts Artifacts) GroupByPlatform() map[string][]*Artifact
- func (artifacts Artifacts) List() []*Artifact
- func (artifacts Artifacts) Paths() []string
- func (artifacts *Artifacts) Remove(filter Filter) error
- type Filter
- type Type
Constants ¶
const ( ExtraID = "ID" ExtraBinary = "Binary" ExtraExt = "Ext" ExtraBuilds = "Builds" ExtraFormat = "Format" ExtraWrappedIn = "WrappedIn" ExtraBinaries = "Binaries" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct { Name string Path string Goos string Goarch string Goarm string Gomips string Type Type Extra map[string]interface{} }
Artifact represents an artifact and its relevant info.
func (Artifact) Checksum ¶ added in v0.84.0
Checksum calculates the checksum of the artifact. nolint: gosec
func (Artifact) ExtraOr ¶ added in v0.96.0
ExtraOr returns the Extra field with the given key or the or value specified if it is nil.
type Artifacts ¶
type Artifacts struct {
// contains filtered or unexported fields
}
Artifacts is a list of artifacts.
func (*Artifacts) Filter ¶
Filter filters the artifact list, returning a new instance. There are some pre-defined filters but anything of the Type Filter is accepted. You can compose filters by using the And and Or filters.
func (Artifacts) GroupByPlatform ¶
GroupByPlatform groups the artifacts by their platform.
type Filter ¶
Filter defines an artifact filter which can be used within the Filter function.
type Type ¶
type Type int
Type defines the type of an artifact.
const ( // UploadableArchive a tar.gz/zip archive to be uploaded. UploadableArchive Type = iota // UploadableBinary is a binary file to be uploaded. UploadableBinary // UploadableFile is any file that can be uploaded. UploadableFile // Binary is a binary (output of a gobuild). Binary // UniversalBinary is a binary that contains multiple binaries within. UniversalBinary // LinuxPackage is a linux package generated by nfpm. LinuxPackage // PublishableSnapcraft is a snap package yet to be published. PublishableSnapcraft // Snapcraft is a published snap package. Snapcraft // PublishableDockerImage is a Docker image yet to be published. PublishableDockerImage // DockerImage is a published Docker image. DockerImage // DockerManifest is a published Docker manifest. DockerManifest // Checksum is a checksums file. Checksum // Signature is a signature file. Signature // UploadableSourceArchive is the archive with the current commit source code. UploadableSourceArchive // BrewTap is an uploadable homebrew tap recipe file. BrewTap // GoFishRig is an uploadable Rigs rig food file. GoFishRig // ScoopManifest is an uploadable scoop manifest file. ScoopManifest )