From 5f87ba361a0ebe377698e12f7b9597e4f4ea2656 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 20 Feb 2016 17:56:14 +0530 Subject: [PATCH] run postupdate first, noinput --- update.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/update.py b/update.py index 9169a265..55662d31 100755 --- a/update.py +++ b/update.py @@ -167,7 +167,7 @@ if __name__ == "__main__": run('git', 'checkout', 'update.py') if old <= 5389: run('./bin/pip', 'install', '-r', 'requirements.txt') - run('./pandora/manage.py', 'migrate', '--fake-initial') + run('./pandora/manage.py', 'migrate', '--fake-initial', '--noinput') service = 'pandora' print('Please install new init script for "%s" service:' % service) if os.path.exists('/etc/init'): @@ -222,13 +222,14 @@ if __name__ == "__main__": run(os.path.join(base, 'bin', 'python'), 'setup.py', 'develop') new += '+' os.chdir(join(base, 'pandora')) - if current != new: - run('./manage.py', 'update_static') - run('./manage.py', 'compile_pyc') if pandora_old_revno != pandora_new_revno: os.chdir(base) run('./update.py', 'postupdate', pandora_old_revno, pandora_new_revno) os.chdir(join(base, 'pandora')) + if current != new: + run('./manage.py', 'update_static') + run('./manage.py', 'compile_pyc') + os.chdir(join(base, 'pandora')) diff = get('./manage.py', 'sqldiff', '-a').strip() if diff != '-- No differences': print('Database has changed, please make a backup and run %s db' % sys.argv[0])