dister

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2018 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const ManualDistTypeName = "manual" // distribution that consists of a distribution whose output is created by the distribution script
View Source
const OSArchBinDistTypeName = "os-arch-bin" // distribution that consists of the binaries for a specific OS/Architecture

Variables

This section is empty.

Functions

func AssetRootCmd

func AssetRootCmd(creator Creator, short string) *cobra.Command

func DefaultConfig

func DefaultConfig() (distgo.DisterConfig, error)

func NewDisterFactory

func NewDisterFactory(providedDisterCreators ...Creator) (distgo.DisterFactory, error)

func NewManualDisterFromConfig

func NewManualDisterFromConfig(cfgYML []byte) (distgo.Dister, error)

func NewOSArchBinDister

func NewOSArchBinDister(osArchs ...osarch.OSArch) distgo.Dister

func NewOSArchBinDisterFromConfig

func NewOSArchBinDisterFromConfig(cfgYML []byte) (distgo.Dister, error)

Types

type Creator

type Creator interface {
	TypeName() string
	Creator() CreatorFunction
}

func AssetDisterCreators

func AssetDisterCreators(assetPaths ...string) ([]Creator, error)

func NewCreator

func NewCreator(typeName string, creatorFn CreatorFunction) Creator

type CreatorFunction

type CreatorFunction func(cfgYML []byte) (distgo.Dister, error)

type ManualDistConfig

type ManualDistConfig struct {
	// Extension is the extension used by the target output generated by the dist script: for example, "tgz",
	// "zip", etc. Extension is used to locate the output generated by the dist script. The output should be a file
	// of the form "{{product-name}}-{{version}}.{{Extension}}". If Extension is empty, it is assumed that the
	// output has no extension and is of the form "{{product-name}}-{{version}}".
	Extension string `yaml:"extension" json:"extension"`
}

func (*ManualDistConfig) ToDister

func (cfg *ManualDistConfig) ToDister() distgo.Dister

type OSArchBinDistConfig

type OSArchBinDistConfig struct {
	// OSArchs specifies the GOOS and GOARCH pairs for which TGZ distributions are created. If blank, defaults to
	// the GOOS and GOARCH of the host system at runtime.
	OSArchs []osarch.OSArch `yaml:"os-archs"`
}

func (*OSArchBinDistConfig) ToDister

func (cfg *OSArchBinDistConfig) ToDister() distgo.Dister

Jump to

Keyboard shortcuts

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