Explorar o código

Fix in the DOI discovery logic

Was returning first tag found, not the latest.  This would likely be the
latest, since tags appear to be discovered in reverse chronological
order, but I don't think this is guaranteed, so checking times is more
reliable.
Achilleas Koutsou %!s(int64=5) %!d(string=hai) anos
pai
achega
492b52bbd0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      internal/context/context_gin.go

+ 1 - 1
internal/context/context_gin.go

@@ -75,9 +75,9 @@ func getRepoDOI(c *Context) string {
 					latestTag = tagName
 					latestTime = commitTime
 				}
-				return latestTag
 			}
 		}
+		return latestTag
 	} else {
 		// this shouldn't happen even if there are no tags
 		// log the error, but fall back to the old method anyway