From 5f92ccb4224d994ee81f6652da934d7796cb8b42 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 31 Oct 2013 13:44:49 -0400 Subject: [PATCH] [manual] Move update-prod-static and update-deployments back to tools/. update-deployment has been replaced by upgrade-zulip for local server instances, since it won't be running off a git repository, and update-prod-static won't be needed since we plan on shipping minified javascript. When we deploy this, the deployment will fail, and then we'll need to update the git checkout from which post-receive runs on git.zulip.net. (imported from commit 86aaedbab09c60ae86ac1d0ae492d0d1bc45569f) --- scripts/upgrade-zulip | 3 ++- tools/post-receive | 2 +- {scripts => tools}/update-deployment | 4 ++-- {scripts => tools}/update-prod-static | 0 4 files changed, 5 insertions(+), 4 deletions(-) rename {scripts => tools}/update-deployment (91%) rename {scripts => tools}/update-prod-static (100%) diff --git a/scripts/upgrade-zulip b/scripts/upgrade-zulip index cb4e9fdb98..20e174fe36 100755 --- a/scripts/upgrade-zulip +++ b/scripts/upgrade-zulip @@ -53,8 +53,9 @@ subprocess.check_call(["rmdir", extract_path]) os.chdir(deploy_path) # Update static files +# TODO: Remove this and replace it with shipping already minified js. logging.info("Updating static files") -subprocess.check_call(["./scripts/update-prod-static", "--prev-deploy", +subprocess.check_call(["./tools/update-prod-static", "--prev-deploy", os.path.join(DEPLOYMENTS_DIR, 'current')]) logging.info("Restarting server...") diff --git a/tools/post-receive b/tools/post-receive index 54f160d486..0c30c2475e 100755 --- a/tools/post-receive +++ b/tools/post-receive @@ -36,7 +36,7 @@ from zulip_tools import check_output, ENDC, FAIL def update_deployment(server, refname): return subprocess.call(["ssh", "-l", "zulip", server, "--", "env", "-u", "GIT_DIR", - "/home/zulip/deployments/current/scripts/update-deployment", refname]) + "/home/zulip/deployments/current/tools/update-deployment", refname]) def send_deployment_finished_message(branch, message): subprocess.check_call(["/home/zulip/zulip/api/bin/zulip-send", "--user=commit-bot@zulip.com", diff --git a/scripts/update-deployment b/tools/update-deployment similarity index 91% rename from scripts/update-deployment rename to tools/update-deployment index a75b0e8fe3..52fa7d5818 100755 --- a/scripts/update-deployment +++ b/tools/update-deployment @@ -36,7 +36,7 @@ while time.time() - start_time < 300: if not got_lock: print FAIL + "Deployment already in progress. Please run\n" \ - + " %s/current/scripts/update-deployment %s\n" % (DEPLOYMENTS_DIR, refname) \ + + " %s/current/tools/update-deployment %s\n" % (DEPLOYMENTS_DIR, refname) \ + "manually when the current deployment finishes." + ENDC sys.exit(1) @@ -51,7 +51,7 @@ os.chdir(deploy_path) # Update static files logging.info("Updating static files") -subprocess.check_call(["./scripts/update-prod-static", "--prev-deploy", +subprocess.check_call(["./tools/update-prod-static", "--prev-deploy", os.path.join(DEPLOYMENTS_DIR, 'current')]) logging.info("Restarting server...") diff --git a/scripts/update-prod-static b/tools/update-prod-static similarity index 100% rename from scripts/update-prod-static rename to tools/update-prod-static