|
|
@ -123,24 +123,24 @@ var path = require('path'),
|
|
|
|
if (global.env !== 'development') {
|
|
|
|
if (global.env !== 'development') {
|
|
|
|
app.enable('cache');
|
|
|
|
app.enable('cache');
|
|
|
|
app.enable('minification');
|
|
|
|
app.enable('minification');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Configure cache-buster timestamp
|
|
|
|
// Configure cache-buster timestamp
|
|
|
|
require('child_process').exec('git describe --tags', {
|
|
|
|
require('child_process').exec('git describe --tags', {
|
|
|
|
cwd: path.join(__dirname, '../')
|
|
|
|
cwd: path.join(__dirname, '../')
|
|
|
|
}, function(err, stdOut) {
|
|
|
|
}, function(err, stdOut) {
|
|
|
|
if (!err) {
|
|
|
|
if (!err) {
|
|
|
|
meta.config['cache-buster'] = stdOut.trim();
|
|
|
|
meta.config['cache-buster'] = stdOut.trim();
|
|
|
|
|
|
|
|
|
|
|
|
if (global.env === 'development') {
|
|
|
|
if (global.env === 'development') {
|
|
|
|
winston.info('[init] Cache buster value set to: ' + stdOut);
|
|
|
|
winston.info('[init] Cache buster value set to: ' + stdOut);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (global.env === 'development') {
|
|
|
|
if (global.env === 'development') {
|
|
|
|
winston.warn('[init] Cache buster not set');
|
|
|
|
winston.warn('[init] Cache buster not set');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Middlewares
|
|
|
|
// Middlewares
|
|
|
|
app.configure(function() {
|
|
|
|
app.configure(function() {
|
|
|
|