flags

package
v0.0.0-...-6f5dceb Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagsFormRepo   = "repo"
	FlagsTargetRepo = "target-repo"
	FlagsUseEnv     = "use-env"

	FlagsBranches = "branches"
	FlagsTags     = "tags"
	FlagsFiles    = "files"
)
View Source
const (
	FlagsWorkspace = "workspace"
	FlagsPlatforms = "platform"
	FlagsEnvFile   = "env"

	FlagsFormUsername   = "username"
	FlagsFormPassword   = "password"
	FlagsFormToken      = "token"
	FlagsTargetUsername = "target-username"
	FlagsTargetPassword = "target-password"
	FlagsTargetToken    = "target-token"
)
View Source
const (
	EnvFormUserName = "USERNAME"
	EnvFormPassword = "PASSWORD"
	EnvFormToken    = "TOKEN"

	EnvTargetUserName = "TARGET_USERNAME"
	EnvTargetPassword = "TARGET_PASSWORD"
	EnvTargetToken    = "TARGET_TOKEN"
)

Variables

This section is empty.

Functions

func BranchFlags

func BranchFlags() []cli.Flag

BranchFlags returns branch selection flag.

func CredentialFlags

func CredentialFlags() []cli.Flag

func FilesFlags

func FilesFlags() []cli.Flag

FilesFlags returns file selection flag.

func FormFlags

func FormFlags() []cli.Flag

func FormReleaseDownload

func FormReleaseDownload() []cli.Flag

func FormReleaseUploadFiles

func FormReleaseUploadFiles() []cli.Flag

func FormTargetReleaseSync

func FormTargetReleaseSync() []cli.Flag

func FormTargetRepo

func FormTargetRepo() []cli.Flag

FormTargetRepo combines flags needed for repository operations.

func FormTargetRepoPush

func FormTargetRepoPush() []cli.Flag

func GetBranches

func GetBranches(cmd *cli.Command) []string

GetBranches returns a slice of branch names specified in the command flags. Branch names are split by comma.

func GetFiles

func GetFiles(cmd *cli.Command) []string

GetFiles returns a slice of file paths specified in the command flags. Supports comma-separated input and file pattern matching.

func GetFirstTags

func GetFirstTags(cmd *cli.Command) (string, error)

GetFirstTags returns the first tag from the command flags. Returns an error if no tags are provided.

func GetFormCredential

func GetFormCredential(cmd *cli.Command, readEnv bool) (*url.URL, *credential.Credential, error)

GetFormCredential retrieves the repository URL and credential from the command. If readEnv is true, it will also try to read credentials from environment variables. Returns:

  • *url.URL: parsed repository URL
  • *credential.Credential: credential object
  • error: any parsing or credential error

func GetTags

func GetTags(cmd *cli.Command) []string

GetTags returns a slice of tag names specified in the command flags. Tag names are split by comma.

func GetTargetCredential

func GetTargetCredential(cmd *cli.Command) (*url.URL, *credential.Credential, error)

GetTargetCredential retrieves the target repository URL and credential from the command. Always reads credentials from environment variables. Returns:

  • *url.URL: parsed target repository URL
  • *credential.Credential: credential object
  • error: any parsing or credential error

func GetWorkspace

func GetWorkspace(cmd *cli.Command) string

GetWorkspace retrieves the workspace path from the command flags.

func GlobalFlags

func GlobalFlags() []cli.Flag

GlobalFlags returns global flags applicable to all commands.

func TagsFlags

func TagsFlags() []cli.Flag

TagsFlags returns tag selection flag.

func TargetFlags

func TargetFlags() []cli.Flag

func UseEnv

func UseEnv(cmd *cli.Command) bool

func UseEnvFlags

func UseEnvFlags() []cli.Flag

Types

This section is empty.

Jump to

Keyboard shortcuts

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