diff --git a/scripts/ci/codegen/spreadGeneration.ts b/scripts/ci/codegen/spreadGeneration.ts index abe80b0663c..ed2f06744aa 100644 --- a/scripts/ci/codegen/spreadGeneration.ts +++ b/scripts/ci/codegen/spreadGeneration.ts @@ -124,6 +124,13 @@ async function spreadGeneration(): Promise { await emptyDirExceptForDotGit(tempGitDir); await copy(clientPath, tempGitDir, { preserveTimestamps: true }); + // We want to ensure we have an up to date `yarn.lock` in the JS client repository + if (lang === 'javascript') { + await run('YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install', { + cwd: tempGitDir, + }); + } + if ( (await getNbGitDiff({ head: null, @@ -141,15 +148,8 @@ async function spreadGeneration(): Promise { const version = getPackageVersionDefault(lang); const commitMessage = cleanUpCommitMessage(lastCommitMessage, version); - // We want to ensure we have an up to date `yarn.lock` in the JS client repository - if (lang === 'javascript') { - await run('YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install', { - cwd: tempGitDir, - }); - } - await configureGitHubAuthor(tempGitDir); - await run(`git add .`, { cwd: tempGitDir }); + await run('git add .', { cwd: tempGitDir }); await gitCommit({ message: commitMessage, coAuthors: [author, ...coAuthors],