Skip to content

Commit

Permalink
Release v3.0.1-beta.10
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Sep 21, 2021
1 parent c5838f1 commit ad5a232
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spug_api/spug/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
re.compile('/apis/.*'),
)

SPUG_VERSION = 'v3.0.1-beta.9'
SPUG_VERSION = 'v3.0.1-beta.10'

# override default config
try:
Expand Down
23 changes: 21 additions & 2 deletions spug_api/tools/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,30 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion spug_web/src/libs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit ad5a232

Please sign in to comment.