context

package
v0.106.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 6 Imported by: 20

Documentation

Overview

Package context provides gorelease context which is passed through the pipeline.

The context extends the standard library context and add a few more fields and other things, so pipes can gather data provided by previous pipes without really knowing each other.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	ctx.Context
	Config       config.Project
	Env          Env
	Token        string
	Git          GitInfo
	Artifacts    artifact.Artifacts
	ReleaseNotes string
	Version      string
	Snapshot     bool
	SkipPublish  bool
	SkipSign     bool
	SkipValidate bool
	RmDist       bool
	PreRelease   bool
	Parallelism  int
	Semver       Semver
}

Context carries along some data through the pipes

func New

func New(config config.Project) *Context

New context

func NewWithTimeout

func NewWithTimeout(config config.Project, timeout time.Duration) (*Context, ctx.CancelFunc)

NewWithTimeout new context with the given timeout

func Wrap

func Wrap(ctx ctx.Context, config config.Project) *Context

Wrap wraps an existing context

type Env added in v0.104.2

type Env map[string]string

Env is the environment variables

func (Env) Strings added in v0.104.2

func (e Env) Strings() []string

Strings returns the current environment as a list of strings, suitable for os executions.

type GitInfo

type GitInfo struct {
	CurrentTag  string
	Commit      string
	ShortCommit string
	FullCommit  string
	URL         string
}

GitInfo includes tags and diffs used in some point

type Semver added in v0.98.0

type Semver struct {
	Major      int64
	Minor      int64
	Patch      int64
	Prerelease string
}

Semver represents a semantic version

Jump to

Keyboard shortcuts

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