Release v3.0.1-beta.10

pull/410/head
vapao 2021-09-21 23:57:24 +08:00
parent c5838f1287
commit ad5a23222f
3 changed files with 23 additions and 4 deletions

View File

@ -131,7 +131,7 @@ AUTHENTICATION_EXCLUDES = (
re.compile('/apis/.*'),
)
SPUG_VERSION = 'v3.0.1-beta.9'
SPUG_VERSION = 'v3.0.1-beta.10'
# override default config
try:

View File

@ -13,11 +13,30 @@ import subprocess
import shutil
import sys
import os
import re
class Version:
def __init__(self, version):
self.version = re.sub('[^0-9.]', '', version).split('.')
def __gt__(self, other):
if not isinstance(other, Version):
raise TypeError('required type Version')
for v1, v2 in zip(self.version, other.version):
if int(v1) == int(v2):
continue
elif int(v1) > int(v2):
return True
else:
return False
return False
if __name__ == '__main__':
version = sys.argv[1]
if version <= 'v3.0.2':
old_version = Version(sys.argv[1])
now_version = Version(settings.SPUG_VERSION)
if old_version <= Version('v3.0.2'):
old_path = os.path.join(settings.BASE_DIR, 'repos')
new_path = os.path.join(settings.REPOS_DIR)
if not os.path.exists(new_path):

View File

@ -10,4 +10,4 @@ export * from './functools';
export * from './router';
export const http = _http;
export const history = _history;
export const VERSION = 'v3.0.1-beta.9';
export const VERSION = 'v3.0.1-beta.10';