Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function runMigrations(migrations: Migration[], options: RunMigrati
}
}

setRootConfig({ version: CURRENT_APP_VERSION });
await setRootConfig({ version: CURRENT_APP_VERSION });

if (options.commitEachMigration) {
await gitCommitNoVerify(`chore: update .config/.cprc.json to version ${CURRENT_APP_VERSION}.`);
Expand Down
9 changes: 9 additions & 0 deletions packages/create-plugin/src/commands/update.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ export const update = async (argv: minimist.ParsedArgs) => {
}

const migrations = getMigrationsToRun(version, CURRENT_APP_VERSION);

if (migrations.length === 0) {
output.log({
title: 'No migrations to run, exiting.',
});

process.exit(0);
}

// filter out minimist internal properties (_ and $0) before passing to codemod
const { _, $0, ...codemodOptions } = argv;
await runMigrations(migrations, {
Expand Down
Loading