Skip to content

Commit

Permalink
fix(scripts): correctly update config file, push playground (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Jun 20, 2022
1 parent 080e5db commit 24b960d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/release/updateAPIVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 24b960d

Please sign in to comment.