فهرست منبع

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 سال پیش
والد
کامیت
492b52bbd0
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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