浏览代码

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