Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pkginfo

  • Loading branch information...
commit 8c86bd033106e63206b889220c93f97299b9c32f 1 parent e5fcf23
@mcandre mcandre authored
Showing with 4 additions and 5 deletions.
  1. +2 −1  bin/db-migrate
  2. +0 −3  index.js
  3. +2 −1  package.json
View
3  bin/db-migrate
@@ -9,6 +9,7 @@ var optimist = require('optimist');
var config = require('../lib/config.js');
var index = require('../index');
var log = require('../lib/log');
+var pkginfo = require('pkginfo')(module, 'version');
process.on('uncaughtException', function(err) {
log.error(err.stack);
@@ -55,7 +56,7 @@ var argv = optimist
.argv;
if (argv.version) {
- console.log(index.version);
+ console.log(module.exports.version);
process.exit(0);
}
View
3  index.js
@@ -18,6 +18,3 @@ exports.createMigration = function(title, migrationsDir, callback) {
callback(null, migration);
});
};
-
-// Must be manually synced with that of package.json.
-exports.version = '0.3.2';
View
3  package.json
@@ -42,7 +42,8 @@
"async": "~0.1.15",
"semver": "~1.0.14",
"mkdirp": "~0.3.4",
- "moment": "~1.7.2"
+ "moment": "~1.7.2",
+ "pkginfo": "~0.3.0"
},
"devDependencies": {
"vows": "~0.6.2",
Please sign in to comment.
Something went wrong with that request. Please try again.