Skip to content

Commit 5ab76a5

Browse files
committed
chg: [v6.2] add v6.2 update
1 parent 3b92c4e commit 5ab76a5

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

update/v6.2/Update.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python3
2+
# -*-coding:UTF-8 -*
3+
4+
import os
5+
import sys
6+
7+
sys.path.append(os.environ['AIL_HOME'])
8+
##################################
9+
# Import Project packages
10+
##################################
11+
from update.bin.ail_updater import AIL_Updater
12+
from lib.ConfigLoader import ConfigLoader
13+
14+
config_loader = ConfigLoader()
15+
r_lang = config_loader.get_db_conn("Kvrocks_Languages")
16+
config_loader = None
17+
18+
class Updater(AIL_Updater):
19+
"""default Updater."""
20+
21+
def __init__(self, version):
22+
super(Updater, self).__init__(version)
23+
24+
25+
if __name__ == '__main__':
26+
updater = Updater('v6.2')
27+
r_lang.flushdb()
28+
updater.run_update()

update/v6.2/Update.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
[ -z "$AIL_HOME" ] && echo "Needs the env var AIL_HOME. Run the script from the virtual environment." && exit 1;
4+
[ -z "$AIL_REDIS" ] && echo "Needs the env var AIL_REDIS. Run the script from the virtual environment." && exit 1;
5+
[ -z "$AIL_BIN" ] && echo "Needs the env var AIL_ARDB. Run the script from the virtual environment." && exit 1;
6+
[ -z "$AIL_FLASK" ] && echo "Needs the env var AIL_FLASK. Run the script from the virtual environment." && exit 1;
7+
8+
export PATH=$AIL_HOME:$PATH
9+
export PATH=$AIL_REDIS:$PATH
10+
export PATH=$AIL_BIN:$PATH
11+
export PATH=$AIL_FLASK:$PATH
12+
13+
GREEN="\\033[1;32m"
14+
DEFAULT="\\033[0;39m"
15+
16+
echo -e $GREEN"Shutting down AIL ..."$DEFAULT
17+
bash ${AIL_BIN}/LAUNCH.sh -k
18+
wait
19+
20+
# SUBMODULES #
21+
git submodule update
22+
23+
bash ${AIL_BIN}/LAUNCH.sh -lrv
24+
bash ${AIL_BIN}/LAUNCH.sh -lkv
25+
26+
echo -e $GREEN"Updating python Lexilang..."$DEFAULT
27+
pip uninstall -y lexilang
28+
pip install -U git+https://github.com/ail-project/LexiLang
29+
30+
echo -e $GREEN"Updating python MeiliSearch..."$DEFAULT
31+
pip install -U meilisearch
32+
33+
echo ""
34+
echo -e $GREEN"Updating AIL VERSION ..."$DEFAULT
35+
echo ""
36+
python ${AIL_HOME}/update/v6.2/Update.py
37+
wait
38+
echo ""
39+
echo ""
40+
41+
exit 0

0 commit comments

Comments
 (0)