commands

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectVersionFiles added in v0.4.0

func CollectVersionFiles(projectPath string, cfg *config.Config, packageNames map[string]bool) ([]string, error)

CollectVersionFiles collects all version files that should be staged for the given packages

func GetEcosystemHandler added in v0.4.0

func GetEcosystemHandler(pkg config.Package, pkgPath string) (ecosystem.Handler, error)

GetEcosystemHandler returns the appropriate ecosystem handler for a package

func NewAddCommand added in v0.4.0

func NewAddCommand() *cobra.Command

NewAddCommand returns the add command

func NewCompletionCommand

func NewCompletionCommand() *cobra.Command

NewCompletionCommand creates the completion command for shell completions.

func NewConfigShowCommand added in v0.4.0

func NewConfigShowCommand() *cobra.Command

NewConfigShowCommand creates the config show command

func NewInitCommand added in v0.4.0

func NewInitCommand() *cobra.Command

NewInitCommand creates the init command

func NewPrereleaseCommand added in v0.4.0

func NewPrereleaseCommand() *cobra.Command

NewPrereleaseCommand creates the prerelease subcommand

func NewPromoteCommand added in v0.4.0

func NewPromoteCommand() *cobra.Command

NewPromoteCommand creates the promote subcommand

func NewReleaseCommand

func NewReleaseCommand() *cobra.Command

NewReleaseCommand creates the release command

func NewReleaseNotesCommand

func NewReleaseNotesCommand() *cobra.Command

NewReleaseNotesCommand creates the release-notes command

func NewRemoveCommand added in v0.4.0

func NewRemoveCommand() *cobra.Command

NewRemoveCommand creates the remove command

func NewSnapshotCommand added in v0.4.0

func NewSnapshotCommand() *cobra.Command

NewSnapshotCommand creates the snapshot subcommand

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 NewValidateCommand added in v0.4.0

func NewValidateCommand() *cobra.Command

NewValidateCommand creates the validate 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 ReadAllCurrentVersions added in v0.4.0

func ReadAllCurrentVersions(projectPath string, cfg *config.Config) (map[string]semver.Version, error)

ReadAllCurrentVersions reads current versions for all configured packages

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 PrereleaseCommandOptions added in v0.4.0

type PrereleaseCommandOptions struct {
	Preview  bool
	NoCommit bool
	NoTag    bool
	Packages []string
	Verbose  bool
	JSON     bool
	Quiet    bool
}

PrereleaseCommandOptions holds options for the prerelease command

type PrereleaseOutput added in v0.4.0

type PrereleaseOutput struct {
	Packages []PrereleasePackageOutput `json:"packages"`
}

PrereleaseOutput is the JSON output structure for prerelease command

type PrereleasePackageOutput added in v0.4.0

type PrereleasePackageOutput struct {
	Name       string `json:"name"`
	OldVersion string `json:"oldVersion"`
	NewVersion string `json:"newVersion"`
	Stage      string `json:"stage"`
	Counter    int    `json:"counter"`
	Tag        string `json:"tag,omitempty"`
}

PrereleasePackageOutput represents a single package in prerelease JSON output

type PromoteCommandOptions added in v0.4.0

type PromoteCommandOptions struct {
	Preview  bool
	NoCommit bool
	NoTag    bool
	Packages []string
	Verbose  bool
	JSON     bool
	Quiet    bool
}

PromoteCommandOptions holds options for the promote command

type PromoteOutput added in v0.4.0

type PromoteOutput struct {
	Packages []PromotePackageOutput `json:"packages"`
}

PromoteOutput is the JSON output structure for promote command

type PromotePackageOutput added in v0.4.0

type PromotePackageOutput struct {
	Name       string `json:"name"`
	OldVersion string `json:"oldVersion"`
	NewVersion string `json:"newVersion"`
	OldStage   string `json:"oldStage"`
	NewStage   string `json:"newStage"`
	Counter    int    `json:"counter"`
	Tag        string `json:"tag,omitempty"`
}

PromotePackageOutput represents a single package in promote JSON output

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 RemoveCommandOptions added in v0.4.0

type RemoveCommandOptions struct {
	IDs   []string
	All   bool
	JSON  bool
	Quiet bool
}

RemoveCommandOptions holds options for the remove command

type RemoveOutput added in v0.4.0

type RemoveOutput struct {
	Removed []string `json:"removed"`
	Count   int      `json:"count"`
}

RemoveOutput is the JSON output structure for remove command

type SnapshotCommandOptions added in v0.4.0

type SnapshotCommandOptions struct {
	Preview  bool
	NoCommit bool
	NoTag    bool
	Packages []string
	Verbose  bool
	JSON     bool
	Quiet    bool
}

SnapshotCommandOptions holds options for the snapshot command

type SnapshotOutput added in v0.4.0

type SnapshotOutput struct {
	Packages []SnapshotPackageOutput `json:"packages"`
}

SnapshotOutput is the JSON output structure for snapshot command

type SnapshotPackageOutput added in v0.4.0

type SnapshotPackageOutput struct {
	Name       string `json:"name"`
	OldVersion string `json:"oldVersion"`
	NewVersion string `json:"newVersion"`
	Timestamp  string `json:"timestamp"`
	Tag        string `json:"tag,omitempty"`
}

SnapshotPackageOutput represents a single package in snapshot JSON output

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 ValidateOutput added in v0.4.0

type ValidateOutput struct {
	Valid    bool     `json:"valid"`
	Errors   []string `json:"errors"`
	Warnings []string `json:"warnings"`
}

ValidateOutput is the JSON output structure for validate 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