moving cache buster to production builds only (*facepalm* I'm bad at this)

v1.18.x
Julian Lam 11 years ago
parent e67af67180
commit b86a01ded1

@ -123,24 +123,24 @@ 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();
// 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');
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() {

Loading…
Cancel
Save