Documentation
¶
Index ¶
- Constants
- type BuildConfig
- type Builder
- type Cleaner
- type Config
- type Debugger
- type DockerImageConfig
- type DockerImager
- type Installer
- type PackageConfig
- type Packager
- type ProjectConfig
- type RunConfig
- type Runner
- type StaticChecker
- type StaticcheckConfig
- type TestConfig
- type Tester
- type Uninstaller
- type Version
Constants ¶
const FileName = "butler.json"
FileName is the name of the config file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildConfig ¶ added in v1.9.5
type BuildConfig struct { OutputPath string `json:"output_path"` // The path of the executable to generate LDFlags []string `json:"ld_flags"` // The ldflags to pass to the build command LDFlagsDarwin []string `json:"ld_flags_darwin"` // The ldflags to pass to the build command for Darwin LDFlagsLinux []string `json:"ld_flags_linux"` // The ldflags to pass to the build command for Linux LDFlagsWindows []string `json:"ld_flags_windows"` // The ldflags to pass to the build command for Windows ExtraArgs []string `json:"extra_args"` // The extra arguments to pass to the build command UseGotip bool `json:"use_gotip"` // Use gotip to build instead of Go itself DependentCmds []string `json:"dependent_cmds"` // commands depends on build; ex: run & test need a fresh build PreBuild string `json:"pre_build"` // not being used PostBuild string `json:"post_build"` // not being used }
BuildConfig contains the build specific configuration settings
type Builder ¶ added in v1.9.5
type Builder struct { common.CommandRunner common.FileSystem common.Timer common.Version OutputPath string GOOS string GOARCH string Verbose bool Debug bool LogDir string }
Builder implements the "build" command
func (*Builder) FixOSnARCH ¶ added in v1.9.7
func (builder *Builder) FixOSnARCH()
type Cleaner ¶ added in v1.9.5
type Cleaner struct { common.FileSystem Verbose bool Debug bool LogDir string }
Cleaner implements the "clean" command
type Config ¶ added in v1.9.5
type Config struct { Project ProjectConfig `json:"project"` // Project contains the general project variables Build BuildConfig `json:"build"` // Build contains the build specific project variables Package PackageConfig `json:"package"` // Build contains the package specific project variables Run RunConfig `json:"run"` // Build contains the run specific project variables Test TestConfig `json:"test"` // Build contains the test specific project variables Staticcheck StaticcheckConfig `json:"staticcheck"` // Staticcheck contains the settings for staticcheck DockerImage DockerImageConfig `json:"docker-image"` // Staticcheck contains the settings for creating a docker image }
Config defines the project configuration
func NewConfigFromDir ¶ added in v1.9.5
NewConfigFromDir parses the config from a file called "butler.json" which should be present in the specified path
type Debugger ¶ added in v1.9.5
type Debugger struct { common.CommandRunner common.FileSystem common.Golang Args []string Verbose bool Debug bool LogDir string }
Debugger implements the "debug" command
type DockerImageConfig ¶ added in v1.9.5
type DockerImageConfig struct { Name string `json:"name"` // The name of the Docker image to create Repository string `json:"repository"` // The repository to push to Tag string `json:"tag"` // What should be used as the tag, either "revision" or "version". Defaults to "version" PruneAfterBuild bool `json:"prune_images_after_build"` // Perform the image prune after building }
DockerImageConfig contains the settings for docker-image
type DockerImager ¶ added in v1.9.5
type DockerImager struct { common.CommandRunner common.FileSystem common.Version Verbose bool Debug bool LogDir string }
DockerImager implements the "docker-image" command
type PackageConfig ¶ added in v1.9.5
type PackageConfig struct {
IncludeReadme bool `json:"include_readme"` // Include the readme when packaging or not
}
PackageConfig contains the build specific configuration settings
type Packager ¶ added in v1.9.5
type Packager struct { common.CommandRunner common.Compressor common.FileSystem common.Timer Concurrency int Verbose bool Debug bool LogDir string }
Packager implements the "package" command
type ProjectConfig ¶ added in v1.9.5
type ProjectConfig struct { Name string `json:"name"` // The name of the project Version string `json:"version"` // The version of the project Description string `json:"description"` // The description of the project Copyright string `json:"copyright"` // The copyright statement for the project MainPackage string `json:"main_package"` // The package path to the main entry point (the package containing main) }
ProjectConfig contains the general project variables
type RunConfig ¶ added in v1.9.5
type RunConfig struct {
Environ map[string]string `json:"environ"` // The environment variables to use when running
}
RunConfig contains the run specific configuration settings
type Runner ¶ added in v1.9.5
type Runner struct { common.CommandRunner common.FileSystem Args []string Verbose bool Debug bool LogDir string }
Runner implements the "run" command
type StaticChecker ¶ added in v1.9.5
type StaticChecker struct { common.CommandRunner common.FileSystem common.Golang Verbose bool Debug bool LogDir string }
StaticChecker implements the "staticcheck" command
type StaticcheckConfig ¶ added in v1.9.5
type StaticcheckConfig struct {
Checks []string `json:"checks"` // The checks which should be executed
}
StaticcheckConfig contains the settings for staticcheck
type TestConfig ¶ added in v1.9.5
type TestConfig struct {
ExtraArgs []string `json:"extra_args"` // The extra arguments to pass to the test command
}
TestConfig contains the test specific configuration settings
type Tester ¶ added in v1.9.5
type Tester struct { common.CommandRunner Verbose bool Debug bool LogDir string }
Tester implements the "test" command
type Uninstaller ¶ added in v1.9.5
Uninstaller implements the "uninstall" command