build

package
v0.0.0-...-71876dc Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_INIT   = 1
	STATUS_ING    = 2
	STATUS_DONE   = 3
	STATUS_FAILED = 4
)
View Source
const (
	COMMAND_TIMEOUT = 86400
)

Variables

This section is empty.

Functions

func NewTask

func NewTask(id int, build *Build, fn CallbackFn) error

func StopTask

func StopTask(id int)

Types

type Build

type Build struct {
	// contains filtered or unexported fields
}

func NewBuild

func NewBuild(repo *Repo, local, tmp, packFile, scripts string) (*Build, error)

func (*Build) Output

func (b *Build) Output() []*command.TaskResult

func (*Build) PackFile

func (b *Build) PackFile() string

func (*Build) PackRealFile

func (b *Build) PackRealFile() string

func (*Build) Result

func (b *Build) Result() *Result

func (*Build) Run

func (b *Build) Run()

func (*Build) Terminate

func (b *Build) Terminate()

type CallbackFn

type CallbackFn func(int, string, *Result, []*command.TaskResult)

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(url, local string) *Repo

func (*Repo) Fetch

func (r *Repo) Fetch() []string

func (*Repo) SetBranch

func (r *Repo) SetBranch(branch string)

func (*Repo) SetCommit

func (r *Repo) SetCommit(version string)

type Result

type Result struct {
	// contains filtered or unexported fields
}

func StatusTask

func StatusTask(id int) (*Result, []*command.TaskResult, error)

func (*Result) During

func (r *Result) During() int

func (*Result) GetError

func (r *Result) GetError() error

func (*Result) Status

func (r *Result) Status() int

Jump to

Keyboard shortcuts

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