mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
chg: [Update] generate current version
This commit is contained in:
parent
3ae47a8659
commit
f6e86582c8
2 changed files with 10 additions and 4 deletions
|
@ -31,7 +31,8 @@ def check_if_files_modified():
|
||||||
if modified_files:
|
if modified_files:
|
||||||
print('Modified Files:')
|
print('Modified Files:')
|
||||||
print('{}{}{}'.format(TERMINAL_BLUE, modified_files.decode(), TERMINAL_DEFAULT))
|
print('{}{}{}'.format(TERMINAL_BLUE, modified_files.decode(), TERMINAL_DEFAULT))
|
||||||
return False
|
#return False
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
@ -135,8 +136,14 @@ def update_fork():
|
||||||
|
|
||||||
|
|
||||||
def get_git_current_tag(current_version_path):
|
def get_git_current_tag(current_version_path):
|
||||||
with open(current_version_path, 'r') as version_content:
|
try:
|
||||||
version = version_content.read()
|
with open(current_version_path, 'r') as version_content:
|
||||||
|
version = version_content.read()
|
||||||
|
except FileNotFoundError:
|
||||||
|
version = 'v1.4'
|
||||||
|
with open(current_version_path, 'w') as version_content:
|
||||||
|
version_content.write(version)
|
||||||
|
|
||||||
version = version.replace(" ", "").splitlines()
|
version = version.replace(" ", "").splitlines()
|
||||||
return version[0]
|
return version[0]
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
v1.4
|
|
Loading…
Reference in a new issue