mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-26 04:08:01 +03:00
Added xxl options to data generation (#19488)
no issue Allows switching between 100k members vs 2M members
This commit is contained in:
parent
5b2de17ac7
commit
ea7290c0da
11
.github/scripts/setup.js
vendored
11
.github/scripts/setup.js
vendored
@ -121,7 +121,14 @@ async function runAndStream(command, args, options) {
|
|||||||
await runAndStream('yarn', ['knex-migrator', 'init'], {cwd: coreFolder});
|
await runAndStream('yarn', ['knex-migrator', 'init'], {cwd: coreFolder});
|
||||||
|
|
||||||
if (resetData) {
|
if (resetData) {
|
||||||
console.log(chalk.blue(`Resetting all data`));
|
const xxl = process.argv.includes('--xxl');
|
||||||
await runAndStream('yarn', ['reset:data'], {cwd: rootFolder});
|
|
||||||
|
if (xxl) {
|
||||||
|
console.log(chalk.blue(`Resetting all data (with xxl)`));
|
||||||
|
await runAndStream('yarn', ['reset:data:xxl'], {cwd: rootFolder});
|
||||||
|
} else {
|
||||||
|
console.log(chalk.blue(`Resetting all data`));
|
||||||
|
await runAndStream('yarn', ['reset:data'], {cwd: rootFolder});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
"fix": "yarn cache clean && rimraf -g '**/node_modules' && yarn",
|
"fix": "yarn cache clean && rimraf -g '**/node_modules' && yarn",
|
||||||
"knex-migrator": "yarn workspace ghost run knex-migrator",
|
"knex-migrator": "yarn workspace ghost run knex-migrator",
|
||||||
"setup": "yarn && git submodule update --init && NODE_ENV=development node .github/scripts/setup.js",
|
"setup": "yarn && git submodule update --init && NODE_ENV=development node .github/scripts/setup.js",
|
||||||
"reset:data": "cd ghost/core && node index.js generate-data --clear-database --quantities members:2000000,posts:0,emails:0,members_stripe_customers:0,members_login_events:0,members_status_events:0 --seed 123",
|
"reset:data": "cd ghost/core && node index.js generate-data --clear-database --quantities members:100000,posts:500 --seed 123",
|
||||||
|
"reset:data:xxl": "cd ghost/core && node index.js generate-data --clear-database --quantities members:2000000,posts:0,emails:0,members_stripe_customers:0,members_login_events:0,members_status_events:0 --seed 123",
|
||||||
"docker:reset": "docker-compose -f .github/scripts/docker-compose.yml down -v && docker-compose -f .github/scripts/docker-compose.yml up -d --wait",
|
"docker:reset": "docker-compose -f .github/scripts/docker-compose.yml down -v && docker-compose -f .github/scripts/docker-compose.yml up -d --wait",
|
||||||
"lint": "nx run-many -t lint",
|
"lint": "nx run-many -t lint",
|
||||||
"test": "nx run-many -t test",
|
"test": "nx run-many -t test",
|
||||||
|
Loading…
Reference in New Issue
Block a user