release

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultOwner is the GitHub organization name for Unbind
	DefaultOwner = "unbindapp"
	// DefaultRepo is the GitHub repository name for Unbind releases
	DefaultRepo = "unbind-releases"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubClientInterface

type GitHubClientInterface interface {
	Repositories() RepositoriesServiceInterface
}

GitHubClientInterface defines the interface for GitHub client operations we need

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles release management functionality

func NewManager

func NewManager(client GitHubClientInterface, releaseRepoOverride string) *Manager

NewManager creates a new release manager

func (*Manager) AvailableUpdates

func (self *Manager) AvailableUpdates(ctx context.Context, currentVersion string) ([]string, error)

AvailableUpdates returns a list of available updates from the current version The list is ordered from the next version to the latest version

func (*Manager) GetLatestVersion

func (self *Manager) GetLatestVersion(ctx context.Context) (string, error)

GetLatestVersion returns the latest available version

func (*Manager) GetNextAvailableVersion

func (m *Manager) GetNextAvailableVersion(ctx context.Context, currentVersion string) (string, error)

GetNextAvailableVersion returns the next version that can be updated to from the current version

func (*Manager) GetRepositoryInfo

func (self *Manager) GetRepositoryInfo() (string, string)

GetRepositoryInfo returns the repository owner and name

func (*Manager) GetUpdatePath

func (self *Manager) GetUpdatePath(ctx context.Context, currentVersion, targetVersion string) ([]string, error)

GetUpdatePath returns an ordered list of versions needed to update from current to target version

func (*Manager) GetVersionMetadata

func (m *Manager) GetVersionMetadata(ctx context.Context) (VersionMetadataMap, error)

GetVersionMetadata fetches the metadata for all versions

type RepositoriesServiceInterface

type RepositoriesServiceInterface interface {
	ListTags(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryTag, *github.Response, error)
	ListReleases(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error)
}

RepositoriesServiceInterface defines the interface for GitHub repositories service

type VersionMetadata

type VersionMetadata struct {
	Version      string   `json:"version"`
	DependsOn    []string `json:"depends_on,omitempty"`    // Versions that must be installed before this one
	RequiredBy   []string `json:"required_by,omitempty"`   // Versions that require this version
	Breaking     bool     `json:"breaking,omitempty"`      // Whether this version contains breaking changes
	Description  string   `json:"description,omitempty"`   // Description of the version
	ReleaseNotes string   `json:"release_notes,omitempty"` // URL to release notes
}

VersionMetadata represents the metadata for a specific version

type VersionMetadataMap

type VersionMetadataMap map[string]VersionMetadata

VersionMetadataMap maps version strings to their metadata

Jump to

Keyboard shortcuts

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