Skip to content

Node.js based forum software built for the modern web

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

Julian Lamb86a01ded1d3
diff --git a/src/webserver.js b/src/webserver.js
index 03af6b98e5..15f4d10a6f 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -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() {