artifact

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//hook script name
	CommitMsg = "commit-msg"
	PreCommit = "pre-commit"
	PrePush   = "pre-push"
)

Variables

This section is empty.

Functions

func GoPath

func GoPath() string

func HookScripts

func HookScripts() map[string]string

func InGit

func InGit() bool

func NewProgress

func NewProgress() *progressbar.ProgressBar

func StreamCmdOutput

func StreamCmdOutput(cmd *exec.Cmd, task string) error

func Version

func Version() string

func Windows

func Windows() bool

Windows return true when current os is Windows

Types

type Execution

type Execution struct {
	CmdKey  string
	Actions []string
}

type GitHook

type GitHook struct {
	CommitMsg string   `mapstructure:"commit-msg"`
	PreCommit []string `mapstructure:"pre-commit"`
	PrePush   []string `mapstructure:"pre-push"`
}

type Plugin

type Plugin struct {
	Alias       string `json:"alias" mapstructure:"alias"`
	Args        string `json:"args" mapstructure:"args"`
	Url         string `json:"url" mapstructure:"url"` //nolint
	Config      string `json:"config" mapstructure:"config"`
	Description string `json:"description" mapstructure:"description"`
	// contains filtered or unexported fields
}

func NewPlugin

func NewPlugin(url string) (Plugin, error)

func (Plugin) Binary

func (plugin Plugin) Binary() string

func (Plugin) Execute

func (plugin Plugin) Execute() error

func (Plugin) Module

func (plugin Plugin) Module() string

func (Plugin) Name

func (plugin Plugin) Name() string

func (*Plugin) UnmarshalJSON

func (plugin *Plugin) UnmarshalJSON(data []byte) error

func (Plugin) Version

func (plugin Plugin) Version() string

type Project

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

func CurProject

func CurProject() *Project

CurProject return Project struct

func (*Project) Dependencies added in v1.0.15

func (project *Project) Dependencies() []string

func (*Project) Executions

func (project *Project) Executions() []Execution

func (*Project) GitHook

func (project *Project) GitHook() GitHook

func (*Project) HookDir

func (project *Project) HookDir() string

func (*Project) InstallDependency added in v1.0.15

func (project *Project) InstallDependency(dep string) error

func (*Project) InstallPlugin added in v1.0.15

func (project *Project) InstallPlugin(plugin Plugin) error

func (*Project) MainFiles

func (project *Project) MainFiles() []string

func (*Project) Module

func (project *Project) Module() string

Module return current project module name

func (*Project) Plugins

func (project *Project) Plugins() []Plugin

func (*Project) Root

func (project *Project) Root() string

Root return root dir of the project

func (*Project) SetupHooks

func (project *Project) SetupHooks(force bool) error

SetupHooks setup git local hooks for project. force means always update gob.yaml

func (*Project) Target

func (project *Project) Target() string

func (*Project) Validate

func (project *Project) Validate() error

Jump to

Keyboard shortcuts

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