From 8c491e92c71ae450b428c358397f99007477284e Mon Sep 17 00:00:00 2001 From: pengshiyu <1940607002@qq.com> Date: Sun, 9 Jul 2023 22:47:36 +0800 Subject: [PATCH] auto release --- domain_admin/utils/whois_util/whois_util.py | 2 +- domain_admin/version.py | 3 ++- version-cli/auto_release.py | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/domain_admin/utils/whois_util/whois_util.py b/domain_admin/utils/whois_util/whois_util.py index 5242220949..c46a0b5b50 100644 --- a/domain_admin/utils/whois_util/whois_util.py +++ b/domain_admin/utils/whois_util/whois_util.py @@ -109,7 +109,7 @@ def get_whois_config(domain): server_config['whois_server'] = domain_whois_server return server_config else: - raise Exception('not support %s'.format(root)) + raise Exception('not support {}'.format(root)) def get_domain_whois_server_from_root(domain): diff --git a/domain_admin/version.py b/domain_admin/version.py index bd9ff60fa3..6bbf713a91 100755 --- a/domain_admin/version.py +++ b/domain_admin/version.py @@ -7,4 +7,5 @@ """ from __future__ import print_function, unicode_literals, absolute_import, division -VERSION = '%s' +VERSION = '1.4.29' + diff --git a/version-cli/auto_release.py b/version-cli/auto_release.py index bd534ae40c..9b377d78ec 100644 --- a/version-cli/auto_release.py +++ b/version-cli/auto_release.py @@ -12,7 +12,6 @@ # 项目根路径 ROOT_DIRNAME = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -print("{}/*/version.py".format(ROOT_DIRNAME)) # 版本文件路径 VERSION_FILE = glob.glob("{}/*/version.py".format(ROOT_DIRNAME))[0] @@ -37,7 +36,7 @@ def parse_version(source_text): def replace_version(source_text, new_version): - return re.sub(VERSION_REGEX, "VERSION = '%s'".format(new_version), source_text) + return re.sub(VERSION_REGEX, "VERSION = '{}'".format(new_version), source_text) def update_version(current_version): @@ -62,7 +61,7 @@ def main(): print(new_version) # 提交代码 - os.system("git add . && git commit -m 'auto release' && git tag v%s && git push --tag".format(new_version)) + os.system("git add . && git commit -m 'auto release' && git tag v{} && git push --tag".format(new_version)) if __name__ == '__main__':