浏览代码

tag 无按时间排序方法

walle-web.io 6 年之前
父节点
当前提交
7df64467a1
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      walle/service/git/repo.py

+ 1 - 2
walle/service/git/repo.py

@@ -102,8 +102,7 @@ class Repo:
         @param kwargs:
         @return:
         '''
-        tags = PyRepo(self.path).git.tag(sort="taggerdate").split('\n')
-        return tags[::-1]
+        return [str(tag) for tag in PyRepo(self.path).tags][-10:]
 
     def commits(self, branch):
         '''