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 ¶
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 ¶
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 ¶
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 ¶
UpdateVersionMarker writes the current version to the version marker file.
Types ¶
type DefaultRelease ¶
type DefaultRelease struct {
// contains filtered or unexported fields
}
func (DefaultRelease) AssetName ¶
func (r DefaultRelease) AssetName() string
func (DefaultRelease) AssetURL ¶
func (r DefaultRelease) AssetURL() string
func (DefaultRelease) Version ¶
func (r DefaultRelease) Version() string
Click to show internal directories.
Click to hide internal directories.