1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix: Fix running release tool

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-04-18 10:54:33 -04:00
parent efa1853960
commit 03349c232b

View File

@ -134,12 +134,7 @@ async function getCurrentVersionOfSubPackage(packageName: string): Promise<SemVe
}
async function checkCurrentWorkingDirectory(): Promise<void> {
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]);