release

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: MIT Imports: 9 Imported by: 0

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