Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jul 24, 2022
1 parent 35a0440 commit 406ac2a
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions run_tags_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,18 @@ def main():
print(cmd)
os.system(cmd)

# 替换文本内容 __version__ = '1.2.5'
# 打开文件 pyefun/__init__.py
# with open("pyefun/__init__.py", "r") as f:
# lines = f.readlines()
# # 找到版本号的行
# for i, line in enumerate(lines):
# if '__version__' in line:
# # 找到版本号的行
# version_line = i
# break
# # 替换版本号
# lines[version_line] = f"__version__ = '{新版本号}'\n"
#
替换文本内容 __version__ = '1.2.5'
打开文件 pyefun/__init__.py
with open("pyefun/__init__.py", "r") as f:
lines = f.readlines()
# 找到版本号的行
for i, line in enumerate(lines):
if '__version__' in line:
# 找到版本号的行
version_line = i
break
# 替换版本号
lines[version_line] = f"__version__ = '{新版本号}'\n"



Expand Down

0 comments on commit 406ac2a

Please sign in to comment.