artifact

package
v0.66.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package artifact provides the core artifact storage for goreleaser

Index

Constants

This section is empty.

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
	Type   Type
	Extra  map[string]string
}

Artifact represents an artifact and its relevant info

type Artifacts

type Artifacts struct {
	// contains filtered or unexported fields
}

Artifacts is a list of artifacts

func New

func New() Artifacts

New return a new list of artifacts

func (*Artifacts) Add

func (artifacts *Artifacts) Add(a Artifact)

Add safely adds a new artifact to an artifact list

func (*Artifacts) Filter

func (artifacts *Artifacts) Filter(filter Filter) Artifacts

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

func (artifacts Artifacts) GroupByPlatform() map[string][]Artifact

GroupByPlatform groups the artifacts by their platform

func (Artifacts) List

func (artifacts Artifacts) List() []Artifact

List return the actual list of artifacts

type Filter

type Filter func(a Artifact) bool

Filter defines an artifact filter which can be used within the Filter function

func And

func And(filters ...Filter) Filter

And performs an AND between all given filters

func ByGoarch

func ByGoarch(s string) Filter

ByGoarch is a predefined filter that filters by the given goarch

func ByGoarm

func ByGoarm(s string) Filter

ByGoarm is a predefined filter that filters by the given goarm

func ByGoos

func ByGoos(s string) Filter

ByGoos is a predefined filter that filters by the given goos

func ByType

func ByType(t Type) Filter

ByType is a predefined filter that filters by the given type

func Or

func Or(filters ...Filter) Filter

Or performs an OR between all given filters

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
	// Binary is a binary (output of a gobuild)
	Binary
	// LinuxPackage is a linux package generated by nfpm or snapcraft
	LinuxPackage
	// DockerImage is a docker image
	DockerImage
	// Checksum is a checksums file
	Checksum
	// Signature is a signature file
	Signature
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL