From 03349c232b14c3b5085fc994ecbf2fe4ba56e98a Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 18 Apr 2023 10:54:33 -0400 Subject: [PATCH] fix: Fix running release tool Signed-off-by: Sebastian Malton --- packages/release-tool/src/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/release-tool/src/index.ts b/packages/release-tool/src/index.ts index d1bc2f9ab778..ccfe7dcc6be8 100755 --- a/packages/release-tool/src/index.ts +++ b/packages/release-tool/src/index.ts @@ -134,12 +134,7 @@ async function getCurrentVersionOfSubPackage(packageName: string): Promise { - const repoRoot = await getAbsolutePathToRepoRoot(); - - if (process.cwd() !== repoRoot) { - console.error("It looks like you are running this script from the 'scripts' directory. This script assumes it is run from the root of the git repo"); - process.exit(1); - } + process.chdir(await getAbsolutePathToRepoRoot()); } function formatSemverForMilestone(version: SemVer): string { @@ -158,7 +153,7 @@ async function createReleaseBranchAndCommit(prBase: string, version: SemVer, prB const prBranch = `release/v${version.format()}`; await pipeExecFile("git", ["checkout", "-b", prBranch]); - await pipeExecFile("git", ["add", "packages/*/package.json"]); + await pipeExecFile("git", ["add", "packages/*/package.json", "package-lock.json"]); await pipeExecFile("git", ["commit", "-sm", `Release ${version.format()}`]); await pipeExecFile("git", ["push", "--set-upstream", "origin", prBranch]);