From f76933aebe3a8ce2e6098f8526a5bd9a47533ed9 Mon Sep 17 00:00:00 2001 From: duolabmeng6 <1715109585@qq.com> Date: Tue, 7 Feb 2023 02:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=89=88=E6=9C=AC=E5=8F=B7bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run_tags_add.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run_tags_add.py b/run_tags_add.py index 529e9bf..c18bee8 100644 --- a/run_tags_add.py +++ b/run_tags_add.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import os -from github import Github +# from github import Github def 查看系统所有环境变量(): from icecream import ic @@ -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 @@ -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)