cmd

package
v0.5.110 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Version   = "v0.5.110"
	Revision  = "b4e13a52e41e"
	Branch    = "v1"
	BuildUser = ""
	BuildDate = "2024-04-18T13:52:40Z"
)
View Source
const (
	DefaultGitUsername    = "ziti-ci"
	DefaultGitEmail       = "ziti-ci@netfoundry.io"
	DefaultSshKeyEnvVar   = "gh_ci_key"
	DefaultGpgKeyEnvVar   = "ziti_ci_gpg_key"
	DefaultGpgKeyIdEnvVar = "ziti_ci_gpg_key_id"
	DefaultSshKeyFile     = "github_deploy_key"
)
View Source
const (
	LangGo   langType = 1
	LangJava langType = 2
)
View Source
const (
	Minor = 1
	Patch = 2
)
View Source
const (
	DefaultVersionFile = "./version"
)

Variables

View Source
var RootCmd = newRootCommand()

Functions

func Finalize

func Finalize(cmd CiCmd) *cobra.Command

Types

type BaseCommand

type BaseCommand struct {
	*RootCommand

	Cmd  *cobra.Command
	Args []string

	BaseVersion    *version.Version
	CurrentVersion *version.Version
	NextVersion    *version.Version

	CurrentBranch *string
	BuildNumber   *string
}

func (*BaseCommand) Errorf

func (cmd *BaseCommand) Errorf(format string, params ...interface{})

func (*BaseCommand) EvalCurrentAndNextVersion

func (cmd *BaseCommand) EvalCurrentAndNextVersion()

func (*BaseCommand) Failf

func (cmd *BaseCommand) Failf(format string, params ...interface{})

func (*BaseCommand) GetCmdOutputOneLine

func (cmd *BaseCommand) GetCmdOutputOneLine(description string, name string, params ...string) string

func (*BaseCommand) GetCobraCmd

func (cmd *BaseCommand) GetCobraCmd() *cobra.Command

func (*BaseCommand) GetCurrentBranch

func (cmd *BaseCommand) GetCurrentBranch() string

func (*BaseCommand) GetUsername

func (cmd *BaseCommand) GetUsername() string

func (*BaseCommand) Infof

func (cmd *BaseCommand) Infof(format string, params ...interface{})

func (*BaseCommand) Init

func (cmd *BaseCommand) Init(args []string)

func (*BaseCommand) RunGitCommand

func (cmd *BaseCommand) RunGitCommand(description string, params ...string)

func (*BaseCommand) Warnf added in v0.5.49

func (cmd *BaseCommand) Warnf(format string, params ...interface{})

type CiCmd

type CiCmd interface {
	GetCobraCmd() *cobra.Command
	Init(args []string)
	Execute()
}

type GoBuildInfo

type GoBuildInfo struct {
	PackageName string
	Version     string
	Revision    string
	Branch      string
	BuildUser   string
	BuildDate   string
}

type GoBuildInfoCmd

type GoBuildInfoCmd struct {
	BaseCommand
	// contains filtered or unexported fields
}

func (*GoBuildInfoCmd) Execute

func (cmd *GoBuildInfoCmd) Execute()

type RootCommand

type RootCommand struct {
	RootCobraCmd *cobra.Command
	// contains filtered or unexported fields
}

func (*RootCommand) Execute

func (r *RootCommand) Execute()

Jump to

Keyboard shortcuts

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