Skip to content

Commit

Permalink
处理版本号bug
Browse files Browse the repository at this point in the history
  • Loading branch information
duolabmeng6 committed Feb 6, 2023
1 parent 14e1434 commit f76933a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion run_tags_add.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import os

from github import Github
# from github import Github

def 查看系统所有环境变量():
from icecream import ic
Expand All @@ -24,6 +24,9 @@ def 版本号从大小写排序(tags):
for tag in tags:
# 获取数值
tag_value = int("".join(tag.split('.')))
# 长度不足补齐
tag_value = tag_value * (10 ** (10 - len(str(tag_value))))

tags_dict.append({
"tag": tag,
'tagint': tag_value
Expand Down Expand Up @@ -99,4 +102,6 @@ def main():

if __name__ == "__main__":
main()
# print(版本号从大小写排序(['1.3.2', '1.3.1', '1.2.22', '1.2.21', '1.2.20']))

exit(0)

0 comments on commit f76933a

Please sign in to comment.