works
Some checks are pending
continuous-integration/drone/push Build is failing

This commit is contained in:
shimunn
2019-04-20 00:35:47 +02:00
parent 605b76798a
commit e0491a5b45
6 changed files with 62 additions and 205 deletions

View File

@@ -55,11 +55,13 @@ def perform_upgrade_command(version,mysql=False,yes=True):
scripts = os.path.join(seaf_home,"seafile-server-%s" % version, "upgrade")
current = map(lambda x: int(x), current_version().split("."))
target = map(lambda x: int(x), version.split("."))
print len(current) == 1 and current[0] == 0
if len(current) == 1 and current[0] == 0: #Not installed
print("Running installer.")
if not call(["seafile-server","setup", os.path.join(seaf_home,"seafile-server-%s" % version) ],stdout=sys.stdout, stdin=sys.stdin):
sys.exit(1)
#print("Running installer.")
#if not call(["seafile-server","setup", os.path.join(seaf_home,"seafile-server-%s" % version) ],stdout=sys.stdout, stdin=sys.stdin):
# sys.exit(1)
crumb = open(seaf_home + "/ahead", 'w')
crumb.write(os.path.join(seaf_home,"seafile-server-%s" % version))
crumb.close()
sys.exit(126)
script_re = "^upgrade_(\d+).(\d+)_(\d+).(\d+)\.sh$"
run = []
@@ -93,6 +95,7 @@ def download(url, version):
return dest
else:
print("Download failed")
sys.exit(1)
return 0
def install_command(url, version):