Documentation
¶
Index ¶
- type BashToolkit
- func (toolkit BashToolkit) Bootstrap() error
- func (toolkit BashToolkit) Check() (bool, ToolkitCheckResult, error)
- func (toolkit BashToolkit) Install() error
- func (toolkit BashToolkit) IsToolAvailableInPATH() bool
- func (toolkit BashToolkit) PrepareForStepRun(_ models.StepModel, _ stepid.CanonicalID, _ string) error
- func (toolkit BashToolkit) StepRunCommandArguments(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
- func (toolkit BashToolkit) ToolkitName() string
- type GoConfigurationModel
- type GoToolkit
- func (toolkit GoToolkit) Bootstrap() error
- func (toolkit GoToolkit) Check() (bool, ToolkitCheckResult, error)
- func (toolkit GoToolkit) Install() error
- func (toolkit GoToolkit) IsToolAvailableInPATH() bool
- func (toolkit GoToolkit) PrepareForStepRun(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) error
- func (toolkit GoToolkit) StepRunCommandArguments(_ models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
- func (toolkit GoToolkit) ToolkitName() string
- type SwiftToolkit
- func (toolkit SwiftToolkit) Bootstrap() error
- func (toolkit SwiftToolkit) Check() (bool, ToolkitCheckResult, error)
- func (toolkit SwiftToolkit) Install() error
- func (toolkit SwiftToolkit) IsToolAvailableInPATH() bool
- func (toolkit SwiftToolkit) PrepareForStepRun(step models.StepModel, _ stepid.CanonicalID, stepAbsDirPath string) error
- func (toolkit SwiftToolkit) StepRunCommandArguments(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
- func (toolkit SwiftToolkit) ToolkitName() string
- type Toolkit
- type ToolkitCheckResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BashToolkit ¶
type BashToolkit struct {
}
func (BashToolkit) Bootstrap ¶
func (toolkit BashToolkit) Bootstrap() error
func (BashToolkit) Check ¶
func (toolkit BashToolkit) Check() (bool, ToolkitCheckResult, error)
func (BashToolkit) Install ¶
func (toolkit BashToolkit) Install() error
func (BashToolkit) IsToolAvailableInPATH ¶
func (toolkit BashToolkit) IsToolAvailableInPATH() bool
func (BashToolkit) PrepareForStepRun ¶
func (toolkit BashToolkit) PrepareForStepRun(_ models.StepModel, _ stepid.CanonicalID, _ string) error
func (BashToolkit) StepRunCommandArguments ¶
func (toolkit BashToolkit) StepRunCommandArguments(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
func (BashToolkit) ToolkitName ¶
func (toolkit BashToolkit) ToolkitName() string
type GoConfigurationModel ¶
type GoToolkit ¶
type GoToolkit struct {
// contains filtered or unexported fields
}
func NewGoToolkit ¶
func (GoToolkit) IsToolAvailableInPATH ¶
func (GoToolkit) PrepareForStepRun ¶
func (toolkit GoToolkit) PrepareForStepRun(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) error
PrepareForStepRun ...
func (GoToolkit) StepRunCommandArguments ¶
func (toolkit GoToolkit) StepRunCommandArguments(_ models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
StepRunCommandArguments ...
func (GoToolkit) ToolkitName ¶
type SwiftToolkit ¶
type SwiftToolkit struct {
}
func (SwiftToolkit) Bootstrap ¶
func (toolkit SwiftToolkit) Bootstrap() error
func (SwiftToolkit) Check ¶
func (toolkit SwiftToolkit) Check() (bool, ToolkitCheckResult, error)
func (SwiftToolkit) Install ¶
func (toolkit SwiftToolkit) Install() error
func (SwiftToolkit) IsToolAvailableInPATH ¶
func (toolkit SwiftToolkit) IsToolAvailableInPATH() bool
func (SwiftToolkit) PrepareForStepRun ¶
func (toolkit SwiftToolkit) PrepareForStepRun(step models.StepModel, _ stepid.CanonicalID, stepAbsDirPath string) error
func (SwiftToolkit) StepRunCommandArguments ¶
func (toolkit SwiftToolkit) StepRunCommandArguments(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
func (SwiftToolkit) ToolkitName ¶
func (toolkit SwiftToolkit) ToolkitName() string
type Toolkit ¶
type Toolkit interface {
// ToolkitName : a one liner name/id of the toolkit, for logging purposes
ToolkitName() string
// Check the toolkit - first returned value (bool) indicates
// whether the toolkit have to be installed (true=install required | false=no install required).
// "Have to be installed" can be true if the toolkit is not installed,
// or if an older version is installed, and an update/newer version is required.
Check() (bool, ToolkitCheckResult, error)
// Install the toolkit
Install() error
// Check whether the toolkit's tool (e.g. Go, Ruby, Bash, ...) is available
// and "usable"" without any bootstrapping.
// Return true even if the version is older than the required version for this toolkit,
// you can pick / init the right version later. This function only checks
// whether the system has a pre-installed version of the toolkit's tool or not,
// no compability check is required!
IsToolAvailableInPATH() bool
// Bootstrap : initialize the toolkit for use, ONLY IF THERE'S NO SYSTEM INSTALLED VERSION!
// If there's any version of the tool (e.g. Go) installed, Bootstrap should not overwrite it,
// so that the non toolkit steps will still use the system installed version!
//
// Will run only once, before the build would actually start,
// so that it can set e.g. a default Go or other language version, if there's no System Installed version!
//
// Bootstrap should only set a sensible default if there's no System Installed version of the tool,
// but should not enforce the toolkit's version of the tool!
// The `PrepareForStepRun` function will be called for every step,
// the toolkit should be "enforced" there, BUT ONLY FOR THAT FUNCTION (e.g. don't call os.Setenv there!)
Bootstrap() error
// PrepareForStepRun can be used to pre-compile or otherwise prepare for the step's execution.
//
// Important: do NOT enforce the toolkit for subsequent / unrelated steps or functions,
// the toolkit should/can be "enforced" here (e.g. during the compilation),
// BUT ONLY for this function! E.g. don't call `os.Setenv` or something similar
// which would affect other functions, just pass the required envs to the compilation command!
PrepareForStepRun(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) error
// StepRunCommandArguments ...
StepRunCommandArguments(step models.StepModel, sIDData stepid.CanonicalID, stepAbsDirPath string) ([]string, error)
}
func AllSupportedToolkits ¶
type ToolkitCheckResult ¶
Click to show internal directories.
Click to hide internal directories.