Skip to content

Commit

Permalink
fix: [ail updater] remove update between tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 23, 2025
1 parent 32e7fb8 commit 3194fb0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 34 deletions.
52 changes: 26 additions & 26 deletions bin/Update.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,31 +311,31 @@ def update_ail(current_tag, list_upper_tags_remote, current_version_path, is_for
print(f'{TERMINAL_RED} Relaunch Launcher {TERMINAL_DEFAULT}')
sys.exit(3)

# EMERGENCY UPDATE between two tags
if len(list_upper_tags_remote) == 1:
# additional update (between 2 commits on the same version)
additional_update_path = os.path.join(os.environ['AIL_HOME'], 'update', current_tag, 'additional_update.sh')
if os.path.isfile(additional_update_path):
print()
print(f'{TERMINAL_YELLOW}------------------------------------------------------------------')
print('- Launching Additional Update: -')
print(f'-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --{TERMINAL_DEFAULT}')
process = subprocess.run(['bash', additional_update_path],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if process.returncode == 0:
output = process.stdout.decode()
print(output)
else:
print(f'{TERMINAL_RED}{process.stderr.decode()}{TERMINAL_DEFAULT}')
aborting_update()
sys.exit(1)

print()
print(f'{TERMINAL_YELLOW}**************** AIL Successfully Updated *****************{TERMINAL_DEFAULT}')
print()
exit(0)

else:
# # EMERGENCY UPDATE between two tags
# if len(list_upper_tags_remote) == 1:
# # additional update (between 2 commits on the same version)
# additional_update_path = os.path.join(os.environ['AIL_HOME'], 'update', current_tag, 'additional_update.sh')
# if os.path.isfile(additional_update_path):
# print()
# print(f'{TERMINAL_YELLOW}------------------------------------------------------------------')
# print('- Launching Additional Update: -')
# print(f'-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --{TERMINAL_DEFAULT}')
# process = subprocess.run(['bash', additional_update_path],
# stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# if process.returncode == 0:
# output = process.stdout.decode()
# print(output)
# else:
# print(f'{TERMINAL_RED}{process.stderr.decode()}{TERMINAL_DEFAULT}')
# aborting_update()
# sys.exit(1)
#
# print()
# print(f'{TERMINAL_YELLOW}**************** AIL Successfully Updated *****************{TERMINAL_DEFAULT}')
# print()
# exit(0)

if list_upper_tags_remote:
for v_update in list_upper_tags_remote:
if is_fork:
version_tag = v_update
Expand Down Expand Up @@ -459,7 +459,7 @@ def aborting_update():
print()
list_upper_tags_remote = get_git_upper_tags_remote(current_tag.replace('v', ''), is_fork)
# new release
if len(list_upper_tags_remote) > 1:
if len(list_upper_tags_remote) > 0:
print('New Releases:')
if is_fork:
for upper_tag in list_upper_tags_remote:
Expand Down
9 changes: 1 addition & 8 deletions update/v6.0.1/Update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,13 @@ echo -e $GREEN"Shutting down AIL ..."$DEFAULT
bash ${AIL_BIN}/LAUNCH.sh -ks
wait

echo -e $GREEN"Updating UI resources..."$DEFAULT
bash ${AIL_BIN}/LAUNCH.sh -ut
wait

echo -e $GREEN"Updating python requirement..."$DEFAULT
pip install -U flask-sock

# SUBMODULES #
git submodule update

echo ""
echo -e $GREEN"Updating AIL VERSION ..."$DEFAULT
echo ""
python ${AIL_HOME}/update/v6.0/Update.py
python ${AIL_HOME}/update/v6.0.1/Update.py
wait
echo ""
echo ""
Expand Down

0 comments on commit 3194fb0

Please sign in to comment.