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(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) error
- func (toolkit BashToolkit) StepRunCommandArguments(step stepmanModels.StepModel, sIDData models.StepIDData, 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 stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) error
- func (toolkit GoToolkit) StepRunCommandArguments(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) ([]string, error)
- func (toolkit GoToolkit) 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 {
}
BashToolkit ...
func (BashToolkit) Check ¶
func (toolkit BashToolkit) Check() (bool, ToolkitCheckResult, error)
Check ...
func (BashToolkit) IsToolAvailableInPATH ¶
func (toolkit BashToolkit) IsToolAvailableInPATH() bool
IsToolAvailableInPATH ...
func (BashToolkit) PrepareForStepRun ¶
func (toolkit BashToolkit) PrepareForStepRun(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) error
PrepareForStepRun ...
func (BashToolkit) StepRunCommandArguments ¶
func (toolkit BashToolkit) StepRunCommandArguments(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) ([]string, error)
StepRunCommandArguments ...
type GoConfigurationModel ¶
type GoConfigurationModel struct {
// full path of the go binary to use
GoBinaryPath string
// GOROOT env var value to set (unless empty)
GOROOT string
}
GoConfigurationModel ...
type GoToolkit ¶
type GoToolkit struct {
}
GoToolkit ...
func (GoToolkit) Check ¶
func (toolkit GoToolkit) Check() (bool, ToolkitCheckResult, error)
Check ...
func (GoToolkit) IsToolAvailableInPATH ¶
IsToolAvailableInPATH ...
func (GoToolkit) PrepareForStepRun ¶
func (toolkit GoToolkit) PrepareForStepRun(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) error
PrepareForStepRun ...
func (GoToolkit) StepRunCommandArguments ¶
func (toolkit GoToolkit) StepRunCommandArguments(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) ([]string, error)
StepRunCommandArguments ...
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 stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) error
// StepRunCommandArguments ...
StepRunCommandArguments(step stepmanModels.StepModel, sIDData models.StepIDData, stepAbsDirPath string) ([]string, error)
}
Toolkit ...
type ToolkitCheckResult ¶
ToolkitCheckResult ...
Click to show internal directories.
Click to hide internal directories.