mirror of https://github.com/zulip/zulip.git
Never use compiled handlebars templates from the previous deploy.
Before this change, we were compiling handlebars templates but then still sometimes used the copy of compiled.js from the previous deploy, which made zero sense. Since compiling is super fast, we continue to compile during every deployment, and now we actually use the results of compiling. Forcing a recompile every time avoids pitfalls like failing to notice deleted files or failing to notice a Handlebars upgrade. (imported from commit 675932428ec420bfe0fd5a5c748a85600206764c)
This commit is contained in:
parent
813fc05b5b
commit
22dcf2e883
|
@ -60,9 +60,6 @@ def get_changed_source_files(other_checkout):
|
|||
continue # Ignore non-static files.
|
||||
|
||||
if filename.endswith('.handlebars'):
|
||||
# Since Handlebars templates are compiled, treat this as if the
|
||||
# compiled .js file changed (which it did).
|
||||
changed.add(os.path.join(STATIC_PATH, 'templates/compiled.js'))
|
||||
continue
|
||||
|
||||
changed.add(filename)
|
||||
|
@ -76,6 +73,9 @@ if prev_deploy:
|
|||
if changed_files is None:
|
||||
prev_deploy = None
|
||||
|
||||
# Always use the newly compiled handlebars templates.
|
||||
changed_files.add(os.path.join(STATIC_PATH, 'templates/compiled.js'))
|
||||
|
||||
JS_SPECS = settings.JS_SPECS
|
||||
CLOSURE_BINARY = 'tools/closure-compiler/run'
|
||||
|
||||
|
|
Loading…
Reference in New Issue