잉여개발기 (SPDV) 5 лет назад
Родитель
Сommit
1e6230c05c
4 измененных файлов с 9 добавлено и 7 удалено
  1. 1 2
      route/api_version.py
  2. 1 4
      route/server_now_update.py
  3. 6 0
      route/tool/func.py
  4. 1 1
      version.json

+ 1 - 2
route/api_version.py

@@ -6,10 +6,9 @@ def api_version_2(conn, r_ver, c_ver):
     n_ver = ''
     data = None
 
-    # master 빌드에 master을 beta로 수정하는 코드 넣어야함
     curs.execute(db_change('select data from other where name = "update"'))
     up_data = curs.fetchall()
-    up_data = up_data[0][0] if up_data else 'stable'
+    up_data = up_data[0][0] if up_data and up_data[0][0] in ['stable', 'beta', 'dev'] else 'stable'
 
     try:
         data = urllib.request.urlopen('https://raw.githubusercontent.com/2du/openNAMU/beta/version.json')

+ 1 - 4
route/server_now_update.py

@@ -11,10 +11,7 @@ def server_now_update_2(conn, r_ver):
 
         curs.execute(db_change('select data from other where name = "update"'))
         up_data = curs.fetchall()
-        if up_data:
-            up_data = up_data[0][0]
-        else:
-            up_data = 'stable'
+        up_data = up_data[0][0] if up_data and up_data[0][0] in ['stable', 'beta', 'dev'] else 'stable'
 
         print('----')
         print('Update')

+ 6 - 0
route/tool/func.py

@@ -267,6 +267,12 @@ def update(ver_num, set_data):
     if ver_num < 3202200:
         curs.execute(db_change('delete from cache_data'))
 
+    if ver_num < 3202400:
+        curs.execute(db_change("select data from other where name = 'update'"))
+        get_data = curs.fetchall()
+        if get_data and get_data[0][0] == 'master':
+            curs.execute(db_change("update other set data = 'beta' where name = 'update'"), [])
+
     conn.commit()
 
     print('Update pass')

+ 1 - 1
version.json

@@ -1,7 +1,7 @@
 {
     "beta" : {
         "r_ver" : "v3.2.0-beta-25 (v3.2.0-dev-202008013-04)",
-        "c_ver" : "3202200",
+        "c_ver" : "3202400",
         "s_ver" : "9"
     }, "stable" : {
         "r_ver" : "v3.2.0-stable-11",