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:
Steve Howell 2014-01-10 13:29:24 -05:00 committed by Waseem Daher
parent 813fc05b5b
commit 22dcf2e883
1 changed files with 3 additions and 3 deletions

View File

@ -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'