mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(upgrade): align notice with platform
This commit is contained in:
parent
129c41ba34
commit
2686a802a3
|
@ -20,7 +20,15 @@ var (
|
||||||
program *tea.Program
|
program *tea.Program
|
||||||
textStyle = lipgloss.NewStyle().Margin(1, 0, 2, 0)
|
textStyle = lipgloss.NewStyle().Margin(1, 0, 2, 0)
|
||||||
title string
|
title string
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
upgradeNotice = `
|
||||||
|
A new release of Oh My Posh is available: %s → %s
|
||||||
|
To upgrade, run: 'oh-my-posh upgrade'
|
||||||
|
|
||||||
|
To enable automated upgrades, set 'auto_upgrade' to 'true' in your configuration.
|
||||||
|
`
|
||||||
Supported = true
|
Supported = true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,16 @@ package upgrade
|
||||||
|
|
||||||
import "github.com/jandedobbeleer/oh-my-posh/src/platform"
|
import "github.com/jandedobbeleer/oh-my-posh/src/platform"
|
||||||
|
|
||||||
|
const (
|
||||||
|
upgradeNotice = `
|
||||||
|
A new release of Oh My Posh is available: %s → %s
|
||||||
|
|
||||||
|
To upgrade, use your favorite package manager or, if you used Homebrew to install, run: 'brew update; brew upgrade oh-my-posh'
|
||||||
|
`
|
||||||
|
)
|
||||||
|
|
||||||
func Run(_ platform.Environment) {}
|
func Run(_ platform.Environment) {}
|
||||||
|
|
||||||
var (
|
const (
|
||||||
Supported = false
|
Supported = false
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,14 +30,8 @@ type release struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RELEASEURL = "https://api.github.com/repos/jandedobbeleer/oh-my-posh/releases/latest"
|
RELEASEURL = "https://api.github.com/repos/jandedobbeleer/oh-my-posh/releases/latest"
|
||||||
upgradeNotice = `
|
CACHEKEY = "upgrade_check"
|
||||||
A new release of Oh My Posh is available: %s → %s
|
|
||||||
To upgrade, run: 'oh-my-posh upgrade'
|
|
||||||
|
|
||||||
To enable automated upgrades, set 'auto_upgrade' to 'true' in your configuration.
|
|
||||||
`
|
|
||||||
CACHEKEY = "upgrade_check"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Latest(env platform.Environment) (string, error) {
|
func Latest(env platform.Environment) (string, error) {
|
||||||
|
|
Loading…
Reference in a new issue