(cmd *cobra.Command, args []string)
| 11 | ) |
| 12 | |
| 13 | func ReleaseCheck(cmd *cobra.Command, args []string) error { |
| 14 | if cli.SkipReleaseCheck || cli.IsDevVersion() { |
| 15 | return nil |
| 16 | } |
| 17 | |
| 18 | ctx := cmd.Context() |
| 19 | |
| 20 | isFresh, err := cli.IsFreshLatestRelease(ctx) |
| 21 | if err != nil { |
| 22 | return err |
| 23 | } |
| 24 | if isFresh { |
| 25 | return nil |
| 26 | } |
| 27 | |
| 28 | isUpgradeable, err := cli.IsUpgradeable(ctx) |
| 29 | if err != nil { |
| 30 | return err |
| 31 | } |
| 32 | |
| 33 | if isUpgradeable { |
| 34 | fmt.Println(ui.Header("New CLI Release Available")) |
| 35 | fmt.Println(ui.StepAlert("Run `anchor version upgrade` to upgrade.")) |
| 36 | } |
| 37 | return nil |
| 38 | } |
| 39 | |
| 40 | func isWindowsRuntime(cfg *cli.Config) bool { |
| 41 | return cfg.GOOS() == "windows" |
nothing calls this directly
no test coverage detected