From b86a01ded1d364d7304407a60869da8ca536828d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 10 Dec 2013 22:20:11 -0500 Subject: [PATCH] moving cache buster to production builds only (*facepalm* I'm bad at this) --- src/webserver.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/webserver.js b/src/webserver.js index 03af6b98e5..15f4d10a6f 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -123,25 +123,25 @@ var path = require('path'), if (global.env !== 'development') { app.enable('cache'); app.enable('minification'); + + // Configure cache-buster timestamp + require('child_process').exec('git describe --tags', { + cwd: path.join(__dirname, '../') + }, function(err, stdOut) { + if (!err) { + meta.config['cache-buster'] = stdOut.trim(); + + if (global.env === 'development') { + winston.info('[init] Cache buster value set to: ' + stdOut); + } + } else { + if (global.env === 'development') { + winston.warn('[init] Cache buster not set'); + } + } + }); } - // Configure cache-buster timestamp - require('child_process').exec('git describe --tags', { - cwd: path.join(__dirname, '../') - }, function(err, stdOut) { - if (!err) { - meta.config['cache-buster'] = stdOut.trim(); - - if (global.env === 'development') { - winston.info('[init] Cache buster value set to: ' + stdOut); - } - } else { - if (global.env === 'development') { - winston.warn('[init] Cache buster not set'); - } - } - }); - // Middlewares app.configure(function() { async.series([