Version checking against the current release and github graphql api.

This commit is contained in:
2021-05-12 10:41:40 +01:00
parent 195192e6d1
commit 2a869e95fa
4 changed files with 40 additions and 7 deletions
+6 -2
View File
@@ -234,8 +234,12 @@ func (s *Setup) getSemver() string {
func main() {
if varShowVersion {
checkLatestRelease()
fmt.Println("semver-gen", PKG_VERSION, "\tMore information: https://github.com/lukaszraczylo/semver-generator")
var outdatedMsg string
latestRelease, latestRelaseOk := checkLatestRelease()
if PKG_VERSION != latestRelease && latestRelaseOk {
outdatedMsg = fmt.Sprintf("(Latest available: %s)", latestRelease)
}
fmt.Println("semver-gen", PKG_VERSION, "", outdatedMsg, "\tMore information: https://github.com/lukaszraczylo/semver-generator")
return
}
if repo.Generate {