commands

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCmd

func AddCmd() *cobra.Command

AddCmd returns the add command

func InitCmd

func InitCmd() *cobra.Command

InitCmd creates the init command

func NewCompletionCommand

func NewCompletionCommand() *cobra.Command

NewCompletionCommand creates the completion command for shell completions.

func NewReleaseCommand

func NewReleaseCommand() *cobra.Command

NewReleaseCommand creates the release command

func NewReleaseNotesCommand

func NewReleaseNotesCommand() *cobra.Command

NewReleaseNotesCommand creates the release-notes command

func NewStatusCommand

func NewStatusCommand() *cobra.Command

NewStatusCommand creates the status command

func NewUpgradeCommand

func NewUpgradeCommand(versionInfo VersionInfo) *cobra.Command

NewUpgradeCommand creates the upgrade command

func NewVersionCommand

func NewVersionCommand() *cobra.Command

NewVersionCommand creates the version command

func PrintJSON

func PrintJSON(w io.Writer, data interface{}) error

PrintJSON outputs data as formatted JSON

func PrintKeyValue

func PrintKeyValue(w io.Writer, key, value string, quiet bool)

PrintKeyValue outputs a key-value pair respecting the quiet flag

func PrintSuccess

func PrintSuccess(w io.Writer, msg string, quiet bool)

PrintSuccess outputs a success message respecting the quiet flag

func RegisterPackageCompletions

func RegisterPackageCompletions(cmd *cobra.Command, flagName string)

RegisterPackageCompletions registers package name completions for a command flag. This enables tab-completion of package names from the Shipyard configuration.

Types

type AddOptions

type AddOptions struct {
	Packages  []string
	Type      string
	Summary   string
	Metadata  map[string]string
	Timestamp time.Time // For testing
	JSON      bool      // Output in JSON format
	Quiet     bool      // Suppress output
}

AddOptions holds the options for the add command

type GlobalFlags

type GlobalFlags struct {
	JSON    bool
	Quiet   bool
	Verbose bool
}

GlobalFlags represents the global flags that can be inherited by all commands

func GetGlobalFlags

func GetGlobalFlags(cmd *cobra.Command) GlobalFlags

GetGlobalFlags extracts global flags from the root command

type InitOptions

type InitOptions struct {
	Force  bool
	Remote string
	Yes    bool // Skip prompts and use defaults
	JSON   bool // Output in JSON format
	Quiet  bool // Suppress output
}

InitOptions contains options for the init command

type ReleaseNotesOptions

type ReleaseNotesOptions struct {
	Package        string
	Output         string
	Version        string
	AllVersions    bool
	MetadataFilter []string
	Template       string
	JSON           bool // Output in JSON format
	Quiet          bool // Suppress output
}

ReleaseNotesOptions holds options for the release-notes command

type ReleaseOptions

type ReleaseOptions struct {
	Package    string
	Draft      bool
	Prerelease bool
	Tag        string
	JSON       bool // Output in JSON format
	Quiet      bool // Suppress output
}

ReleaseOptions holds options for the release command

type StatusOptions

type StatusOptions struct {
	Packages []string
	Output   string
	Quiet    bool
	Verbose  bool
}

StatusOptions holds the options for the status command

type UpgradeOptions

type UpgradeOptions struct {
	Yes     bool   // Skip confirmation
	Version string // Specific version (default: latest)
	Force   bool   // Upgrade even if on latest
	DryRun  bool   // Show plan without executing
	JSON    bool   // Output in JSON format
	Quiet   bool   // Suppress output
}

UpgradeOptions contains options for the upgrade command

type VersionCommandOptions

type VersionCommandOptions struct {
	Preview  bool     // --preview: Show changes without applying
	NoCommit bool     // --no-commit: Skip git commit
	NoTag    bool     // --no-tag: Skip git tag creation
	Packages []string // --package: Filter to specific packages
	Verbose  bool     // --verbose: Show detailed output
}

VersionCommandOptions holds options for the version command

type VersionInfo

type VersionInfo struct {
	Version string
	Commit  string
	Date    string
}

VersionInfo contains build version information

Jump to

Keyboard shortcuts

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