Documentation ¶
Index ¶
- Variables
- func Publish(c *CliContext) (err error)
- type BuildTool
- func (b *BuildTool) Commands(c *Context) (cmds []*cli.Command)
- func (b *BuildTool) Configurations() (cfgs []*typcfg.Configuration)
- func (b *BuildTool) EnablePrecondition(enablePrecondition bool) *BuildTool
- func (b *BuildTool) Precondition(c *PreconditionContext) (err error)
- func (b *BuildTool) RunBuildTool(c *typcore.Context) (err error)
- func (b *BuildTool) Utilities(utilities ...Utility) *BuildTool
- func (b *BuildTool) Validate() (err error)
- type Cleaner
- type CliContext
- type CliFunc
- type Context
- type GithubModule
- type NoPrefixFilter
- type PreconditionContext
- func (c *PreconditionContext) ASTStore() *typast.ASTStore
- func (c *PreconditionContext) Info(args ...interface{})
- func (c *PreconditionContext) Infof(format string, args ...interface{})
- func (c *PreconditionContext) SetASTStore(astStore *typast.ASTStore)
- func (c *PreconditionContext) Warn(args ...interface{})
- func (c *PreconditionContext) Warnf(format string, args ...interface{})
- type Preconditioner
- type PublishContext
- type Publisher
- type ReleaseContext
- type ReleaseFilter
- type ReleaseTarget
- type Releaser
- type Runner
- type SimpleUtility
- type StdBuild
- type Tester
- type Utility
- type UtilityFn
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultReleaseFolder is default value for release folder location DefaultReleaseFolder = "release" // DefaultBinFolder is default value for bin folder DefaultBinFolder = "bin" // DefaultCmdFolder is default value for cmd folder DefaultCmdFolder = "cmd" // DefaultConfigFile is default config file path DefaultConfigFile = ".env" // DefaultEnablePrecondition is default precondition flag DefaultEnablePrecondition = true // Linux as releast target Linux ReleaseTarget = "linux/amd64" // Darwin as releast target Darwin ReleaseTarget = "darwin/amd64" )
Functions ¶
Types ¶
type BuildTool ¶ added in v0.9.33
type BuildTool struct {
// contains filtered or unexported fields
}
BuildTool is typical Build Tool for golang project
func BuildSequences ¶ added in v0.9.45
func BuildSequences(buildSequences ...interface{}) *BuildTool
BuildSequences create new instance of BuildTool with build-sequence
func (*BuildTool) Configurations ¶ added in v0.9.48
func (b *BuildTool) Configurations() (cfgs []*typcfg.Configuration)
Configurations of Build-Tool
func (*BuildTool) EnablePrecondition ¶ added in v0.9.48
EnablePrecondition define whether execute precondition or not. By default if true
func (*BuildTool) Precondition ¶ added in v0.9.47
func (b *BuildTool) Precondition(c *PreconditionContext) (err error)
Precondition for this project
func (*BuildTool) RunBuildTool ¶ added in v0.9.47
RunBuildTool to run the build-tool
type Cleaner ¶ added in v0.9.38
type Cleaner interface {
Clean(*CliContext) error
}
Cleaner responsible to clean the project
type CliContext ¶ added in v0.9.50
type CliContext struct { *cli.Context typlog.Logger Name string Core *typcore.Context BuildTool *BuildTool }
CliContext is context of build
type CliFunc ¶ added in v0.9.50
type CliFunc func(*CliContext) error
CliFunc is command line function
type GithubModule ¶ added in v0.9.43
type GithubModule struct {
// contains filtered or unexported fields
}
GithubModule publisher
func (*GithubModule) Filter ¶ added in v0.9.48
func (g *GithubModule) Filter(filter ReleaseFilter) *GithubModule
Filter define filter message
func (*GithubModule) Publish ¶ added in v0.9.43
func (g *GithubModule) Publish(c *PublishContext) (err error)
Publish to github
func (*GithubModule) ReleaseFilter ¶ added in v0.9.43
func (g *GithubModule) ReleaseFilter(msg string) string
ReleaseFilter to filter the message
type NoPrefixFilter ¶ added in v0.9.38
type NoPrefixFilter struct {
// contains filtered or unexported fields
}
NoPrefixFilter is filter no-prefix
func DefaultNoPrefix ¶ added in v0.9.38
func DefaultNoPrefix() *NoPrefixFilter
DefaultNoPrefix return filter with no-prefix
func NoPrefix ¶ added in v0.9.38
func NoPrefix(prefixes ...string) *NoPrefixFilter
NoPrefix return filter with no-prefix
func (*NoPrefixFilter) Append ¶ added in v0.9.38
func (f *NoPrefixFilter) Append(prefixes ...string) *NoPrefixFilter
Append to return NoPrefixFilter with appended prefix
func (*NoPrefixFilter) ReleaseFilter ¶ added in v0.9.38
func (f *NoPrefixFilter) ReleaseFilter(msg string) string
ReleaseFilter to filter the messages
type PreconditionContext ¶ added in v0.9.50
type PreconditionContext struct { typtmpl.Precond Logger typlog.Logger Core *typcore.Context Ctx context.Context // contains filtered or unexported fields }
PreconditionContext is context of preconditioning
func (*PreconditionContext) ASTStore ¶ added in v0.9.50
func (c *PreconditionContext) ASTStore() *typast.ASTStore
ASTStore return the ast store
func (*PreconditionContext) Info ¶ added in v0.9.50
func (c *PreconditionContext) Info(args ...interface{})
Info logger
func (*PreconditionContext) Infof ¶ added in v0.9.50
func (c *PreconditionContext) Infof(format string, args ...interface{})
Infof logger
func (*PreconditionContext) SetASTStore ¶ added in v0.9.50
func (c *PreconditionContext) SetASTStore(astStore *typast.ASTStore)
SetASTStore to set ast store
func (*PreconditionContext) Warn ¶ added in v0.9.50
func (c *PreconditionContext) Warn(args ...interface{})
Warn logger
func (*PreconditionContext) Warnf ¶ added in v0.9.50
func (c *PreconditionContext) Warnf(format string, args ...interface{})
Warnf logger
type Preconditioner ¶ added in v0.9.42
type Preconditioner interface {
Precondition(c *PreconditionContext) error
}
Preconditioner responsible to precondition
type PublishContext ¶ added in v0.9.38
type PublishContext struct { *ReleaseContext ReleaseFiles []string }
PublishContext is context of publish
type Publisher ¶ added in v0.9.38
type Publisher interface {
Publish(*PublishContext) error
}
Publisher responsible to publish the release to external source
type ReleaseContext ¶ added in v0.9.38
type ReleaseContext struct { *CliContext Alpha bool Tag string GitLogs []*git.Log }
ReleaseContext is context of release
type ReleaseFilter ¶ added in v0.9.38
ReleaseFilter responsible to filter the commit message
type ReleaseTarget ¶ added in v0.9.38
type ReleaseTarget string
ReleaseTarget contain OS and Arch as target of release operation
func (ReleaseTarget) Arch ¶ added in v0.9.38
func (t ReleaseTarget) Arch() string
Arch return the system architecture information
func (ReleaseTarget) OS ¶ added in v0.9.38
func (t ReleaseTarget) OS() string
OS return the operating system information
func (ReleaseTarget) Validate ¶ added in v0.9.38
func (t ReleaseTarget) Validate() (err error)
Validate release target
type Releaser ¶ added in v0.9.38
type Releaser interface {
Release(*ReleaseContext) (files []string, err error)
}
Releaser responsible to release
type Runner ¶ added in v0.9.49
type Runner interface {
Run(c *CliContext) error
}
Runner responsible to run the project in local environment
type SimpleUtility ¶ added in v0.9.47
type SimpleUtility struct {
// contains filtered or unexported fields
}
SimpleUtility return command based on command function
func NewUtility ¶ added in v0.9.47
func NewUtility(fn UtilityFn) *SimpleUtility
NewUtility return new instance SimpleUtility
func (*SimpleUtility) Commands ¶ added in v0.9.47
func (s *SimpleUtility) Commands(ctx *Context) (cmds []*cli.Command)
Commands return list of command
func (*SimpleUtility) Configurations ¶ added in v0.9.48
func (s *SimpleUtility) Configurations() (cfgs []*typcfg.Configuration)
Configurations of utility
func (*SimpleUtility) Configure ¶ added in v0.9.48
func (s *SimpleUtility) Configure(configurer typcfg.Configurer) *SimpleUtility
Configure the utility
type StdBuild ¶ added in v0.9.49
type StdBuild struct {
// contains filtered or unexported fields
}
StdBuild is standard build module for go project
func StandardBuild ¶ added in v0.9.43
func StandardBuild() *StdBuild
StandardBuild return new instance of Module
func (*StdBuild) Clean ¶ added in v0.9.49
func (b *StdBuild) Clean(c *CliContext) (err error)
Clean build result
func (*StdBuild) Release ¶ added in v0.9.49
func (b *StdBuild) Release(c *ReleaseContext) (files []string, err error)
Release this project
func (*StdBuild) Run ¶ added in v0.9.49
func (b *StdBuild) Run(c *CliContext) (err error)
Run the project locally
func (*StdBuild) Test ¶ added in v0.9.49
func (b *StdBuild) Test(c *CliContext) (err error)
Test the project
type Tester ¶ added in v0.9.38
type Tester interface {
Test(*CliContext) error
}
Tester responsible to test the project