Documentation
¶
Index ¶
- func ClearPlan() error
- func SavePlan(plan *ReleasePlan) error
- func WaitForModuleAvailability(ctx context.Context, modulePath, version string) error
- func WaitForModuleAvailabilityWithConfig(ctx context.Context, modulePath, version string, config WaitConfig) error
- func WaitForMultipleModules(ctx context.Context, modules map[string]string) error
- type ReleasePlan
- type RepoReleasePlan
- type WaitConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SavePlan ¶
func SavePlan(plan *ReleasePlan) error
SavePlan marshals and writes the plan to disk.
func WaitForModuleAvailability ¶
WaitForModuleAvailability polls until a module version is available on the Go module proxy
func WaitForModuleAvailabilityWithConfig ¶
func WaitForModuleAvailabilityWithConfig(ctx context.Context, modulePath, version string, config WaitConfig) error
WaitForModuleAvailabilityWithConfig polls with custom configuration
Types ¶
type ReleasePlan ¶
type ReleasePlan struct {
CreatedAt time.Time `json:"created_at"`
Repos map[string]*RepoReleasePlan `json:"repos"` // Keyed by repo name
ReleaseLevels [][]string `json:"release_levels"` // Topologically sorted repo names for orchestration
RootDir string `json:"root_dir"` // The root of the ecosystem being released
ParentVersion string `json:"parent_version"` // The parent ecosystem version
ParentCurrentVersion string `json:"parent_current_version"` // Current parent ecosystem version
Type string `json:"type,omitempty"` // "full" or "rc"
}
ReleasePlan represents the state of an entire release operation.
func LoadPlan ¶
func LoadPlan() (*ReleasePlan, error)
LoadPlan reads and unmarshals the release plan from disk.
type RepoReleasePlan ¶
type RepoReleasePlan struct {
CurrentVersion string `json:"current_version"`
SuggestedBump string `json:"suggested_bump"` // "major", "minor", or "patch"
SuggestionReasoning string `json:"suggestion_reasoning"`
SelectedBump string `json:"selected_bump"`
NextVersion string `json:"next_version"`
ChangelogPath string `json:"changelog_path"` // Path to the staged changelog file
ChangelogCommit string `json:"changelog_commit"` // Git commit hash when changelog was generated
Status string `json:"status"` // "Pending Review", "Approved", "-"
Selected bool `json:"selected"` // Whether this repo is selected for release
// Changelog tracking for dirty detection
ChangelogHash string `json:"changelog_hash,omitempty"` // SHA256 hash of generated changelog content
ChangelogState string `json:"changelog_state,omitempty"` // "clean", "dirty", or "none"
ChangelogPushed bool `json:"changelog_pushed,omitempty"` // Whether changelog has been committed and pushed
CIPassed bool `json:"ci_passed,omitempty"` // Whether CI passed after changelog push
TagPushed bool `json:"tag_pushed,omitempty"` // Whether release tag has been created and pushed
// Release operation tracking
LastFailedOperation string `json:"last_failed_operation,omitempty"` // Track which operation failed for better recovery
// Git status information
Branch string `json:"branch,omitempty"`
IsDirty bool `json:"is_dirty,omitempty"`
HasUpstream bool `json:"has_upstream,omitempty"`
AheadCount int `json:"ahead_count,omitempty"` // Commits ahead of upstream
BehindCount int `json:"behind_count,omitempty"` // Commits behind upstream
ModifiedCount int `json:"modified_count,omitempty"`
StagedCount int `json:"staged_count,omitempty"`
UntrackedCount int `json:"untracked_count,omitempty"`
CommitsSinceLastTag int `json:"commits_since_last_tag,omitempty"`
}
RepoReleasePlan holds the plan for a single repository.
type WaitConfig ¶
type WaitConfig struct {
MaxRetries int
InitialBackoff time.Duration
MaxBackoff time.Duration
Timeout time.Duration
}
WaitConfig holds configuration for waiting on module availability
func DefaultWaitConfig ¶
func DefaultWaitConfig() WaitConfig
DefaultWaitConfig returns the default wait configuration
Click to show internal directories.
Click to hide internal directories.