/go-update

Go package for auto-updating system-specific binaries via GitHub releases.

Primary LanguageGoMIT LicenseMIT

go-update

Package update provides tooling to auto-update binary releases from GitHub based on the user's current version and operating system. Used by command-line tools such as Up and Apex.

changes in this fork (diodechain)

  1. Added the update.FindZip() func that searches for a '.zip' file instead of '.tar' like the update.FindTarball() func

  2. Changed github.latestRelease implementation to compare version strings with dots and dashes numerically. Supported are 'v1.2.3' 'v1.2.3-22' and similiar. Examples:

    • 'v1.2.3-22' > 'v1.2.3'
    • 'v1.2.4' > 'v1.2.3'
    • 'v2' > 'v1.2.3'
    • 'v2' == '2'
    • 'v2.0' == 'v2'
    • 'v2.0.0.0.0' == 'v2'
  3. Added windows support. (update.InstallTo() used to fail there)

  4. Added update.Restart() method


GoDoc