updater

package
v0.2.82 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGitHubRepo = "PipeOpsHQ/pipeops-cli" // Reverted back to actual repository
	// For separate releases repo, use: "PipeOpsHQ/pipeops-cli-releases"
	UpdateCheckInterval = 24 * time.Hour
)

Variables

This section is empty.

Functions

func GetGitHubRepo

func GetGitHubRepo() string

GetGitHubRepo returns the GitHub repository to use, checking environment variable first

Types

type Asset

type Asset struct {
	Name               string `json:"name"`
	ContentType        string `json:"content_type"`
	Size               int64  `json:"size"`
	DownloadCount      int    `json:"download_count"`
	BrowserDownloadURL string `json:"browser_download_url"`
}

Asset represents a GitHub release asset

type Release

type Release struct {
	TagName     string    `json:"tag_name"`
	Name        string    `json:"name"`
	Draft       bool      `json:"draft"`
	Prerelease  bool      `json:"prerelease"`
	CreatedAt   time.Time `json:"created_at"`
	PublishedAt time.Time `json:"published_at"`
	Assets      []Asset   `json:"assets"`
	Body        string    `json:"body"`
}

Release represents a GitHub release

type UpdateService

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

UpdateService handles CLI updates

func NewUpdateService

func NewUpdateService(currentVersion string) *UpdateService

NewUpdateService creates a new update service

func (*UpdateService) CheckForUpdates

func (s *UpdateService) CheckForUpdates(ctx context.Context) (*Release, bool, error)

CheckForUpdates checks if a new version is available

func (*UpdateService) UpdateCLI

func (s *UpdateService) UpdateCLI(ctx context.Context, release *Release, opts utils.OutputOptions) error

UpdateCLI downloads and installs the latest version

Jump to

Keyboard shortcuts

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