Permalink
Browse files

added --version flag

  • Loading branch information...
1 parent 21a9f86 commit e5fcf23cd0c9f4ed4506c392d2b96fe4438c612b @mcandre mcandre committed Feb 14, 2013
Showing with 12 additions and 0 deletions.
  1. +9 −0 bin/db-migrate
  2. +3 −0 index.js
View
@@ -45,11 +45,20 @@ var argv = optimist
.alias('h', '?')
.boolean('h')
+ .describe('version', 'Print version info.')
+ .alias('i', 'version')
+ .boolean('version')
+
.describe('config', 'Location of the database.json file.')
.string('config')
.argv;
+if (argv.version) {
+ console.log(index.version);
+ process.exit(0);
+}
+
if (argv.help || argv._.length == 0) {
optimist.showHelp();
process.exit(1);
View
@@ -18,3 +18,6 @@ exports.createMigration = function(title, migrationsDir, callback) {
callback(null, migration);
});
};
+
+// Must be manually synced with that of package.json.
+exports.version = '0.3.2';

0 comments on commit e5fcf23

Please sign in to comment.