mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
moving cache buster to production builds only (*facepalm* I'm bad at this)
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user