Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCirculatedDependency = errors.New("task dependency is circulated")
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Rootdir string `json:"rootdir"` Tasks map[string]DocumentTask `json:"tasks,omitempty"` GlobalEnvs map[string]string `json:"global_envs,omitempty"` }
func NewDocument ¶
func NewDocument(ctx context.Context, options ...NewDocumentOption) (Document, error)
type DocumentConfig ¶
type DocumentConfig struct { Document Document ExecPathResolver map[string]ExecConfig }
type DocumentTask ¶
type DocumentTask struct { Parent *Document `json:"-"` Title string `json:"omitempty"` Call string `json:"call"` Description string `json:"description,omitempty"` Scripts []DocumentTaskScript `json:"scripts"` Envs map[string]string `json:"envs,omitempty"` Skips TaskSkipCondition `json:"skips,omitempty"` Requires TaskRequireCondition `json:"requires,omitempty"` DependTasks []string `json:"depend_tasks,omitempty"` }
type DocumentTaskScript ¶
type DocumentTaskScript struct { Config ExecConfig Script string }
type ExecConfig ¶
type NewDocumentOption ¶
type NewDocumentOption func(ctx context.Context, d *DocumentConfig) error
func NewDocOptionRootDir ¶
func NewDocOptionRootDir(dirname string) NewDocumentOption
type TaskFileNotChangedCondition ¶
type TaskFileNotChangedCondition struct { Paths setString `json:"paths,omitempty"` Ignores setString `json:"ignores,omitempty"` MD5 string `json:"md5,omitempty"` }
func (*TaskFileNotChangedCondition) IsEqualRule ¶
func (cond *TaskFileNotChangedCondition) IsEqualRule(paths []string, ignores []string) bool
type TaskRequireCondition ¶
type TaskRequireCondition struct {
ExistPaths []string `json:"exist_paths,omitempty"`
}
type TaskSkipCondition ¶
type TaskSkipCondition struct { ExistPaths []string `json:"exist_paths,omitempty"` NotChangedPaths []TaskFileNotChangedCondition `json:"not_changed_paths,omitempty"` }
Click to show internal directories.
Click to hide internal directories.