Documentation
¶
Index ¶
- func GetLastUsedVersion() string
- func GetMigrationMessage() string
- func HandleSelfUpdate(currentVersion string, logger *zap.Logger, fs filesystem.FileSystem, ...) chan string
- func IsUpgradeFromV0() bool
- func UpdateVersionMarker(version string) error
- type DefaultRelease
- type DefaultUpdater
- type Release
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLastUsedVersion ¶ added in v1.0.0
func GetLastUsedVersion() string
GetLastUsedVersion reads the last used version from the version marker file. Returns empty string if no version marker exists (fresh install or v0.x user).
func GetMigrationMessage ¶ added in v1.0.0
func GetMigrationMessage() string
GetMigrationMessage returns the migration message shown to users upgrading from v0.x
func HandleSelfUpdate ¶
func HandleSelfUpdate( currentVersion string, logger *zap.Logger, fs filesystem.FileSystem, updater Updater, ) chan string
func IsUpgradeFromV0 ¶ added in v1.0.0
func IsUpgradeFromV0() bool
IsUpgradeFromV0 checks if the user is upgrading from v0.x to v1.0+. This is detected when: 1. No version marker file exists (never tracked version before) 2. History file exists in the old v0.x location (~/.local/share/gsh/history.db)
func UpdateVersionMarker ¶ added in v1.0.0
UpdateVersionMarker writes the current version to the version marker file.
Types ¶
type DefaultRelease ¶ added in v0.9.2
type DefaultRelease struct {
// contains filtered or unexported fields
}
func (DefaultRelease) AssetName ¶ added in v0.9.2
func (r DefaultRelease) AssetName() string
func (DefaultRelease) AssetURL ¶ added in v0.9.2
func (r DefaultRelease) AssetURL() string
func (DefaultRelease) Version ¶ added in v0.9.2
func (r DefaultRelease) Version() string
type DefaultUpdater ¶ added in v0.9.2
type DefaultUpdater struct{}
func (DefaultUpdater) DetectLatest ¶ added in v0.9.2
Click to show internal directories.
Click to hide internal directories.