Fixed support manual major upgrade.

This commit is contained in:
Shuai Lin 2016-11-29 17:09:11 +08:00
parent ccedb31221
commit ea4f3762f7
2 changed files with 8 additions and 3 deletions

View file

@ -379,6 +379,11 @@ rebuild() {
manual_upgrade() {
_launch_for_upgrade
loginfo "If you have manually upgraded the server, please update the version stamp by:"
loginfo
loginfo " echo $version | sudo tee $version_stamp_file"
loginfo " sudo ./launcher start"
loginfo
}
main() {

View file

@ -18,6 +18,8 @@ import colorlog
logger = logging.getLogger('.utils')
DEBUG_ENABLED = os.environ.get('SEAFILE_DOCKER_VERBOSE', '').lower() in ('true', '1', 'yes')
def eprint(*a, **kw):
kw['file'] = sys.stderr
print(*a, **kw)
@ -48,7 +50,7 @@ def _find_flag(args, *opts, **kw):
def call(*a, **kw):
dry_run = kw.pop('dry_run', False)
quiet = kw.pop('quiet', False)
quiet = kw.pop('quiet', DEBUG_ENABLED)
cwd = kw.get('cwd', os.getcwd())
check_call = kw.pop('check_call', True)
reduct_args = kw.pop('reduct_args', [])
@ -243,8 +245,6 @@ def logdbg(msg):
msg = '[debug] ' + msg
loginfo(msg)
DEBUG_ENABLED = os.environ.get('SEAFILE_DOCKER_VERBOSE', '').lower() in ('true', '1', 'yes')
def loginfo(msg):
msg = '[{}] {}'.format(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'), green(msg))
eprint(msg)