Fix SMS batch apply dry-run env and add rollout tracker.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -101,17 +101,21 @@ function main() {
|
||||
continue;
|
||||
}
|
||||
|
||||
const childEnv = {
|
||||
const childEnv: NodeJS.ProcessEnv = {
|
||||
...process.env,
|
||||
SMS_IMPORT_DOMAIN: target.domain,
|
||||
SMS_IMPORT_PRODUCT: product,
|
||||
SMS_IMPORT_DRY_RUN: dryRun ? '1' : env('SMS_IMPORT_DRY_RUN'),
|
||||
SMS_IMPORT_DB_HOST: String(db.host || '127.0.0.1'),
|
||||
SMS_IMPORT_DB_PORT: String(db.port || 3306),
|
||||
SMS_IMPORT_DB_USER: String(db.user || 'root'),
|
||||
SMS_IMPORT_DB_PASSWORD: String(db.password ?? ''),
|
||||
SMS_IMPORT_DB_DATABASE: String(db.database),
|
||||
};
|
||||
if (dryRun) {
|
||||
childEnv.SMS_IMPORT_DRY_RUN = '1';
|
||||
} else {
|
||||
delete childEnv.SMS_IMPORT_DRY_RUN;
|
||||
}
|
||||
|
||||
console.log(`\n=== ${dryRun ? 'DRY ' : ''}IMPORT ${target.domain} (${product}) ===`);
|
||||
const result = spawnSync(
|
||||
|
||||
Reference in New Issue
Block a user