From 2fcf778100fac2273b4fdf47a180b3811794ab67 Mon Sep 17 00:00:00 2001 From: Eunjae Lee Date: Tue, 12 Apr 2022 10:39:23 +0200 Subject: [PATCH 1/2] chore(ci): fix spread logic --- scripts/ci/codegen/spreadGeneration.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/ci/codegen/spreadGeneration.ts b/scripts/ci/codegen/spreadGeneration.ts index cbcf7f965f5..4358e9a0f06 100644 --- a/scripts/ci/codegen/spreadGeneration.ts +++ b/scripts/ci/codegen/spreadGeneration.ts @@ -68,18 +68,17 @@ async function spreadGeneration(): Promise { console.log( `❎ Skipping ${lang} repository, because there is no change.` ); - return; + } else { + await configureGitHubAuthor(tempGitDir); + await run(`git add .`, { cwd: tempGitDir }); + await gitCommit({ + message: commitMessage, + coauthor: { name, email }, + cwd: tempGitDir, + }); + await run(`git push`, { cwd: tempGitDir }); + console.log(`✅ Spread the generation to ${lang} repository.`); } - - await configureGitHubAuthor(tempGitDir); - await run(`git add .`, { cwd: tempGitDir }); - await gitCommit({ - message: commitMessage, - coauthor: { name, email }, - cwd: tempGitDir, - }); - await run(`git push`, { cwd: tempGitDir }); - console.log(`✅ Spread the generation to ${lang} repository.`); } } From 993c1033e697ad2f059fce58f986d98055d33578 Mon Sep 17 00:00:00 2001 From: Eunjae Lee Date: Tue, 12 Apr 2022 14:11:52 +0200 Subject: [PATCH 2/2] chore: early continue --- scripts/ci/codegen/spreadGeneration.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/ci/codegen/spreadGeneration.ts b/scripts/ci/codegen/spreadGeneration.ts index 4358e9a0f06..51bfceab66a 100644 --- a/scripts/ci/codegen/spreadGeneration.ts +++ b/scripts/ci/codegen/spreadGeneration.ts @@ -68,17 +68,18 @@ async function spreadGeneration(): Promise { console.log( `❎ Skipping ${lang} repository, because there is no change.` ); - } else { - await configureGitHubAuthor(tempGitDir); - await run(`git add .`, { cwd: tempGitDir }); - await gitCommit({ - message: commitMessage, - coauthor: { name, email }, - cwd: tempGitDir, - }); - await run(`git push`, { cwd: tempGitDir }); - console.log(`✅ Spread the generation to ${lang} repository.`); + continue; } + + await configureGitHubAuthor(tempGitDir); + await run(`git add .`, { cwd: tempGitDir }); + await gitCommit({ + message: commitMessage, + coauthor: { name, email }, + cwd: tempGitDir, + }); + await run(`git push`, { cwd: tempGitDir }); + console.log(`✅ Spread the generation to ${lang} repository.`); } }