Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions lib/commands/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand All @@ -99,6 +109,10 @@ var command = {
networkMessage += " (dry run)";
}

if (withoutCompile) {
networkMessage += " (without compile)";
}

config.logger.log(networkMessage + "." + OS.EOL);

if (dryRun) {
Expand All @@ -107,7 +121,6 @@ var command = {
runMigrations(done);
}
});
});
}
}

Expand Down