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 ¶
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
Click to show internal directories.
Click to hide internal directories.