CompareVersions returns true if latest is different from the base version of current. Dev builds (e.g. "0.4.0-61-gd06835b") are compared by their base tag ("0.4.0").
(current, latest string)
| 204 | // CompareVersions returns true if latest is different from the base version of current. |
| 205 | // Dev builds (e.g. "0.4.0-61-gd06835b") are compared by their base tag ("0.4.0"). |
| 206 | func CompareVersions(current, latest string) bool { |
| 207 | current = normalizeVersion(current) |
| 208 | latest = normalizeVersion(latest) |
| 209 | return baseVersion(current) != latest && current != "dev" |
| 210 | } |
| 211 | |
| 212 | // findAssets locates the binary and checksum assets for the given OS/arch. |
| 213 | func findAssets(assets []Asset, goos, goarch string) (*Asset, *Asset) { |