Skip to content

Commit

Permalink
fix(schematics): clean up the output of nx-migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Jan 31, 2018
1 parent 5420f48 commit 7ab14e3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/schematics/src/command-line/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function check(latestMigration: string, migrations: MigrationName[]): void {
const target = migrations[migrations.length - 1].name;
console.log(`Or run 'npm run nx-migrate:skip' to set the latestMigration property`);
console.log(`in .angular-cli.json to: '${target}'.`);
console.log('-----------------------------------------------------------------------------');
}

function run(latestMigration: string, migrations: MigrationName[]): void {
Expand All @@ -83,12 +82,6 @@ function run(latestMigration: string, migrations: MigrationName[]): void {
process.exit(0);
}

console.log(`Nx will run the following migrations (after ${latestMigration}):`);
migrations.forEach(m => {
console.log(`- ${m.name}`);
});
console.log('-----------------------------------------------------------------------------');

migrations.forEach(m => {
try {
console.log(`Running ${m.name}`);
Expand All @@ -105,8 +98,12 @@ function run(latestMigration: string, migrations: MigrationName[]): void {

updateLatestMigration(migrations);

console.log(`The following migrations have been run:`);
migrations.forEach(m => {
console.log(`- ${m.name}`);
});

const target = migrations[migrations.length - 1].name;
console.log('All migrations run successfully.');
console.log(`The latestMigration property in .angular-cli.json has been set to '${target}'.`);
}

Expand Down

0 comments on commit 7ab14e3

Please sign in to comment.