Added no-seed flag to yarn setup. (#19697)

refs https://ghost.slack.com/archives/C02G9E68C/p1707994528206559

- When running Ghost development and using MySQL + Docker, you can run
the command `yarn setup --no-seed` to not have the database seeded with
test data.
This commit is contained in:
Ronald Langeveld 2024-02-15 14:48:08 +02:00 committed by GitHub
parent 25f744ccea
commit bc7ff4be9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,7 +119,11 @@ async function runAndStream(command, args, options) {
console.log(chalk.blue(`Running knex-migrator init`)); console.log(chalk.blue(`Running knex-migrator init`));
await runAndStream('yarn', ['knex-migrator', 'init'], {cwd: coreFolder}); await runAndStream('yarn', ['knex-migrator', 'init'], {cwd: coreFolder});
if (process.argv.includes('--no-seed')) {
console.log(chalk.yellow(`Skipping seed data`));
console.log(chalk.yellow(`Done`));
return;
}
if (resetData) { if (resetData) {
const xxl = process.argv.includes('--xxl'); const xxl = process.argv.includes('--xxl');