typrls

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlphaFlag alpha flag
	AlphaFlag = "alpha"
	// TagNameFlag tag name flag
	TagNameFlag = "tag-name"
	// SkipPublishFlag skip publish flag
	SkipPublishFlag = "skip-publish"
	// ReleaseFolderFlag release folder flag
	ReleaseFolderFlag = "release-folder"
)

Variables

View Source
var DefaultPrefixes = []string{"merge", "bump", "revision", "generate", "wip"}

DefaultPrefixes ...

Functions

func DefaultGenerateSummary

func DefaultGenerateSummary(c *typgo.Context) string

DefaultGenerateSummary default generate summary

func DefaultGenerateTag

func DefaultGenerateTag(c *typgo.Context, alpha bool) string

DefaultGenerateTag create release tag

func GitCurrentTag

func GitCurrentTag(c *typgo.Context) string

GitCurrentTag return git current tag

func GitFetch

func GitFetch(c *typgo.Context) error

GitFetch fetch the latest update

func HasPrefix

func HasPrefix(msg string, prefixes []string) bool

HasPrefix return true if eligible to excluded by prefix

Types

type Context

type Context struct {
	*typgo.Context
	Alpha         bool
	TagName       string
	ReleaseFolder string
	Summary       string
}

Context contain data for release

type CrossCompiler

type CrossCompiler struct {
	Targets     []Target
	MainPackage string
}

CrossCompiler compile project to various platform

func (*CrossCompiler) Release

func (o *CrossCompiler) Release(c *Context) error

Release for compile

type Git

type Git struct {
	Status     string
	CurrentTag string
	Logs       []*Log
}

Git detail

type Github

type Github struct {
	Owner string
	Repo  string
	Draft bool
}

Github to publish

func (*Github) Publish

func (g *Github) Publish(c *Context) (err error)

Publish to github

type Log

type Log struct {
	ShortCode    string
	Message      string
	CoAuthoredBy string
}

Log git

func CreateLog

func CreateLog(raw string) *Log

CreateLog to create git log from raw message

func GitLogs

func GitLogs(c *typgo.Context, from string) (logs []*Log)

GitLogs return git logs

type NewPublisher

type NewPublisher func(*Context) error

PublishFn release function

func (NewPublisher) Publish

func (n NewPublisher) Publish(c *Context) error

type NewReleaser

type NewReleaser func(*Context) error

ReleaseFn release function

func (NewReleaser) Release

func (r NewReleaser) Release(c *Context) error

type Publisher

type Publisher interface {
	Publish(*Context) error
}

Publisher responsible to publish (from release folder)

type Publishers

type Publishers []Publisher

Publishers for composite publish

func (Publishers) Publish

func (p Publishers) Publish(c *Context) (err error)

Publish the release

type ReleaseProject

type ReleaseProject struct {
	Before            typgo.Action
	GenerateTagFn     func(c *typgo.Context, alpha bool) string
	GenerateSummaryFn func(c *typgo.Context) string
	Releaser          Releaser
	Publisher         Publisher
}

ReleaseProject release command

func (*ReleaseProject) Execute

func (r *ReleaseProject) Execute(c *typgo.Context) error

Execute release

func (*ReleaseProject) Task

func (r *ReleaseProject) Task() *typgo.Task

Task to release

type Releaser

type Releaser interface {
	Release(*Context) error
}

Releaser responsible to release (put file to release folder)

type Releasers

type Releasers []Releaser

Releasers for composite release

func (Releasers) Release

func (r Releasers) Release(c *Context) (err error)

Release the releasers

type Target

type Target string

Target of release contain "$GOOS/$GOARC"

func (Target) Arch

func (t Target) Arch() string

Arch architecture

func (Target) OS

func (t Target) OS() string

OS operating system

Jump to

Keyboard shortcuts

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