Skip to content

Commit

Permalink
fix: Fix running release tool
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Malton <[email protected]>
  • Loading branch information
Nokel81 committed Apr 18, 2023
1 parent efa1853 commit 03349c2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/release-tool/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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]);

Expand Down

0 comments on commit 03349c2

Please sign in to comment.