mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
upgrade-zulip-stage-2: Add --skip-migrations option.
This commit is contained in:
@@ -28,6 +28,8 @@ parser.add_argument("deploy_path", metavar="deploy_path",
|
|||||||
help="Path to deployment directory")
|
help="Path to deployment directory")
|
||||||
parser.add_argument("--skip-puppet", dest="skip_puppet", action='store_true',
|
parser.add_argument("--skip-puppet", dest="skip_puppet", action='store_true',
|
||||||
help="Skip doing puppet/apt upgrades.")
|
help="Skip doing puppet/apt upgrades.")
|
||||||
|
parser.add_argument("--skip-migrations", dest="skip_migrations", action='store_true',
|
||||||
|
help="Skip doing migrations.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
deploy_path = args.deploy_path
|
deploy_path = args.deploy_path
|
||||||
@@ -52,8 +54,9 @@ if not args.skip_puppet:
|
|||||||
subprocess.check_call(["./scripts/zulip-puppet-apply", "--force"])
|
subprocess.check_call(["./scripts/zulip-puppet-apply", "--force"])
|
||||||
subprocess.check_call(["apt-get", "upgrade"])
|
subprocess.check_call(["apt-get", "upgrade"])
|
||||||
|
|
||||||
logging.info("Applying database migrations...")
|
if not args.skip_migrations:
|
||||||
subprocess.check_call(["./manage.py", "migrate", "--noinput"], preexec_fn=su_to_zulip)
|
logging.info("Applying database migrations...")
|
||||||
|
subprocess.check_call(["./manage.py", "migrate", "--noinput"], preexec_fn=su_to_zulip)
|
||||||
|
|
||||||
logging.info("Restarting Zulip...")
|
logging.info("Restarting Zulip...")
|
||||||
subprocess.check_call(["cp", "-rT", os.path.join(deploy_path, 'prod-static/serve'),
|
subprocess.check_call(["cp", "-rT", os.path.join(deploy_path, 'prod-static/serve'),
|
||||||
|
|||||||
Reference in New Issue
Block a user