Skip to content

Commit

Permalink
🎨 🔦 read ghost version from package.json
Browse files Browse the repository at this point in the history
refs #6982
[ci skip]
  • Loading branch information
kirrg001 authored and ErisDS committed Sep 20, 2016
1 parent d42f4f6 commit 042e0da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions core/server/config/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var nconf = require('nconf'),
path = require('path'),
localUtils = require('./utils'),
packageInfo = require('../../../package.json'),
env = process.env.NODE_ENV || 'development';

nconf.set('NODE_ENV', env);
Expand Down Expand Up @@ -28,5 +29,11 @@ nconf.file('4', __dirname + '/defaults.json');
*/
localUtils.makePathsAbsolute.bind(nconf)();

/**
* values we have to set manual
* @TODO: ghost-cli?
*/
nconf.set('ghostVersion', packageInfo.version);

module.exports = nconf;
module.exports.isPrivacyDisabled = localUtils.isPrivacyDisabled.bind(nconf);
1 change: 0 additions & 1 deletion core/server/config/overrides.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"ghostVersion": "0.10.1",
"paths": {
"appRoot": ".",
"corePath": "core/",
Expand Down

0 comments on commit 042e0da

Please sign in to comment.