1 Star 0 Fork 106

1058971441 / QVirtualKeyboard

forked from 海石生风 / QVirtualKeyboard 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
logversion.py 653 Bytes
一键复制 编辑 原始数据 按行查看 历史
海石生风 提交于 2023-11-30 21:11 . “完善makepkg打包配置”
#!/usr/bin/python
import sys
import re
def lastLogInfo(changelogPath):
version = ""
rev = "1"
with open(changelogPath) as changelog:
line = ""
while len(line) == 0 or line.isspace():
line = changelog.readline()
m = re.search("\((.+)\)", line)
version = m.groups()[0]
syms = version.split('-')
version = syms[0]
if len(syms) > 1:
rev = syms[1]
return version, rev
if __name__ == "__main__":
if len(sys.argv) < 2:
changelogPath = "debian/changelog"
else:
changelogPath = sys.argv[1]
version, _= lastLogInfo(changelogPath)
print(version)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/lb-cs/QVirtualKeyboard.git
git@gitee.com:lb-cs/QVirtualKeyboard.git
lb-cs
QVirtualKeyboard
QVirtualKeyboard
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891