Bläddra i källkod

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 5 år sedan
förälder
incheckning
492b52bbd0
1 ändrade filer med 1 tillägg och 1 borttagningar
  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