mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
upgrade: Don't require authors updates deploying from Git.
Fixes #3392.
This commit is contained in:
@@ -70,7 +70,7 @@ if args.from_git:
|
||||
# update-prod-static with the git upgrade process. But it'll fail
|
||||
# safely; this seems like a worthwhile tradeoff to minimize downtime.
|
||||
logging.info("Building static assets...")
|
||||
subprocess.check_call(["./tools/update-prod-static", "--prev-deploy",
|
||||
subprocess.check_call(["./tools/update-prod-static", "--authors-not-required", "--prev-deploy",
|
||||
os.path.join(DEPLOYMENTS_DIR, 'current')],
|
||||
preexec_fn=su_to_zulip)
|
||||
else:
|
||||
|
||||
@@ -32,6 +32,8 @@ parser.add_argument('--max-retries', type=int, default=3,
|
||||
# fetching from Github constantly.
|
||||
parser.add_argument('--use-fixture', action='store_true', default=False,
|
||||
help='Use fixture data instead of fetching from Github')
|
||||
parser.add_argument('--not-required', action='store_true', default=False,
|
||||
help='Consider failures to reach GitHub nonfatal')
|
||||
args = parser.parse_args()
|
||||
|
||||
def fetch_data(retries, link):
|
||||
@@ -88,7 +90,7 @@ def run_production():
|
||||
|
||||
write_to_disk(out_data, settings.CONTRIBUTORS_DATA)
|
||||
|
||||
else:
|
||||
elif not args.not_required:
|
||||
print('Fail to fetch data from Github.')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ from scripts.lib.node_cache import setup_node_modules
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--prev-deploy', metavar='DIR',
|
||||
help='a previous deploy from which to reuse files if possible')
|
||||
parser.add_argument('--authors-not-required', action='store_true', default=False,
|
||||
help='Authors files need not be updated')
|
||||
args = parser.parse_args()
|
||||
prev_deploy = args.prev_deploy
|
||||
|
||||
@@ -68,6 +70,8 @@ subprocess.check_call(['cp', '-a', 'static/locale',
|
||||
authors_cmd = ['./tools/update-authors-json']
|
||||
if os.environ.get("TRAVIS"):
|
||||
authors_cmd.append("--use-fixture")
|
||||
if args.authors_not_required:
|
||||
authors_cmd.append("--not-required")
|
||||
subprocess.check_call(authors_cmd, stdout=fp)
|
||||
|
||||
fp.close()
|
||||
|
||||
Reference in New Issue
Block a user