From 24b960d7ae56dcb415d2f297ef9b4711940d12f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Mon, 20 Jun 2022 18:14:37 +0200 Subject: [PATCH] fix(scripts): correctly update config file, push playground (#725) --- scripts/release/updateAPIVersions.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/release/updateAPIVersions.ts b/scripts/release/updateAPIVersions.ts index f11d61cb1d..318c89f087 100755 --- a/scripts/release/updateAPIVersions.ts +++ b/scripts/release/updateAPIVersions.ts @@ -72,7 +72,7 @@ async function updateVersionForJavascript( Object.values(GENERATORS) .filter((gen) => gen.language === 'javascript') .forEach((gen) => { - const additionalProperties = gen.additionalProperties!; + const additionalProperties = gen.additionalProperties; const newVersion = semver.inc( additionalProperties.packageVersion, jsVersion.releaseType @@ -101,6 +101,10 @@ async function updateVersionForJavascript( browserPgPackageFile.dependencies[additionalProperties.packageName] = newVersion; } + + // We don't want this field to be in the final file, it only exists + // in the scripts. + additionalProperties.packageName = undefined; }); CLIENTS_JS_UTILS.forEach((util) => { @@ -275,7 +279,7 @@ export async function updateAPIVersions( console.log(`Pushing updated changes to ${headBranch}`); const commitMessage = generationCommitText.commitPrepareReleaseMessage; - await run(`git add clients config`, { verbose: true }); + await run('git add .', { verbose: true }); if (process.env.LOCAL_TEST_DEV) { await run(`CI=true git commit -m "${commitMessage} [skip ci]"`, { verbose: true,