Skip to content

Commit

Permalink
version check changed to github
Browse files Browse the repository at this point in the history
  • Loading branch information
Isan-Rivkin committed Apr 20, 2022
1 parent fe6aa04 commit 4ab3994
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,22 @@ r53 will use your default AWS credentials`,
}

func VersionCheck() {

var err error
optoutVar := "R53_VERSION_CHECK"
i := v.NewInput("route53-cli", "https://looperly.co", AppVersion, &optoutVar)
if out, err := v.CheckVersion(i); err == nil {
if out.Outdated {
m := fmt.Sprintf("%s is not latest, %s, upgrade to %s", out.CurrentVersion, out.Message, out.LatestVersion)
log.Warn(m)
}
i := v.NewInput("route53-cli", "https://github.com/isan-rivkin", AppVersion, &optoutVar)
out, err := v.CheckVersion(i)

if err != nil || out == nil {
log.WithError(err).Debug("failed checking latest version from github.com")
return
}

if out.Outdated {
m := fmt.Sprintf("%s is not latest, %s, upgrade to %s", out.CurrentVersion, out.Message, out.LatestVersion)
log.Warn(m)
}
}

func ExecuteR53() {
depth := *recusiveSearchMaxDepth
if !*recursiveSearch {
Expand Down

0 comments on commit 4ab3994

Please sign in to comment.