diff --git a/lib/commands/migrate.js b/lib/commands/migrate.js index c76c914..e8a57e6 100644 --- a/lib/commands/migrate.js +++ b/lib/commands/migrate.js @@ -19,6 +19,11 @@ var command = { f: { describe: "Specify a migration number to run from", type: "number" + }, + "without-compile": { + describe: "Run migrations without compiling contracts", + type: "boolean", + default: false } }, run: function (options, done) { @@ -85,8 +90,13 @@ var command = { } }; - Contracts.compile(config, function(err) { - if (err) return done(err); + var withoutCompile = options.withoutCompile === true; + + if (withoutCompile == false){ + Contracts.compile(config, function(err) { + if (err) return done(err); + }); + } Environment.detect(config, function(err) { if (err) return done(err); @@ -99,6 +109,10 @@ var command = { networkMessage += " (dry run)"; } + if (withoutCompile) { + networkMessage += " (without compile)"; + } + config.logger.log(networkMessage + "." + OS.EOL); if (dryRun) { @@ -107,7 +121,6 @@ var command = { runMigrations(done); } }); - }); } }