mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-28 19:58:38 +00:00
feat: version config
This commit is contained in:
parent
5fa671c933
commit
4f91b57aa2
6 changed files with 38 additions and 9 deletions
20
ci/generate-version.py
Normal file
20
ci/generate-version.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
if __name__ == '__main__':
|
||||
p = os.popen('git rev-list --tags --max-count=1')
|
||||
commit = p.read()
|
||||
p.close()
|
||||
|
||||
p = os.popen('git describe --tags ' + commit)
|
||||
tag = p.read()
|
||||
p.close()
|
||||
|
||||
# print('get tag:', tag)
|
||||
|
||||
version = str(tag[1:])
|
||||
version_file = os.path.abspath(os.path.join(os.path.dirname(__file__), "../QtScrcpy/version"))
|
||||
file=open(version_file, 'w')
|
||||
file.write(version)
|
||||
file.close()
|
||||
sys.exit(0)
|
Loading…
Add table
Add a link
Reference in a new issue