From 27d400956916c532db461a5cec122e153455f62a Mon Sep 17 00:00:00 2001 From: Oren Date: Tue, 16 Jan 2018 13:51:35 +0200 Subject: [PATCH 1/2] Add migrate --without-compile --- lib/commands/migrate.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/commands/migrate.js b/lib/commands/migrate.js index c76c914..d99e161 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); @@ -107,7 +117,6 @@ var command = { runMigrations(done); } }); - }); } } From 1a8e3c9edc60bb50d710c7e183e27ba499bc7a7d Mon Sep 17 00:00:00 2001 From: Oren Date: Tue, 16 Jan 2018 14:52:18 +0200 Subject: [PATCH 2/2] Add log (without compile) --- lib/commands/migrate.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/commands/migrate.js b/lib/commands/migrate.js index d99e161..e8a57e6 100644 --- a/lib/commands/migrate.js +++ b/lib/commands/migrate.js @@ -109,6 +109,10 @@ var command = { networkMessage += " (dry run)"; } + if (withoutCompile) { + networkMessage += " (without compile)"; + } + config.logger.log(networkMessage + "." + OS.EOL); if (dryRun) {