-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.py
More file actions
33 lines (26 loc) · 864 Bytes
/
version.py
File metadata and controls
33 lines (26 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
版本信息文件
在GitHub Actions构建时,版本号会被自动更新
"""
__version__ = "0.0.0" # 开发版本,在GitHub Actions构建时会被替换
__author__ = "Trigger-CN"
__github_url__ = "https://github.com/Trigger-CN/SerialPortMonitor"
def get_version():
"""获取版本号"""
return __version__
def get_author():
"""获取作者"""
return __author__
def get_author_email():
"""获取作者邮箱"""
return __author_email__
def get_github_url():
"""获取GitHub链接"""
return __github_url__
def get_app_title():
"""获取应用程序标题(包含版本号和作者)"""
if __version__ and __version__ != "0.0.0":
return f"🔧串口监看工具 v{__version__} by {__author__}"
else:
return f"🔧串口监看工具 by {__author__}"