Skip to content

Commit

Permalink
fix: scoping issue in publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
ekashida committed Apr 9, 2021
1 parent f497d44 commit 0b2f905
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions scripts/release/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,14 @@ try {
console.error(`The commit referenced by "${tag}" is not contained by any release branch.`);
process.exit(1);
}
} catch (ex) {
console.error(ex);
process.exit(1);
}

const [, releaseBranch] = result;
const distTag = releaseBranch === 'master' ? 'next' : releaseBranch;
const [, releaseBranch] = result;
const distTag = releaseBranch === 'master' ? 'next' : releaseBranch;

console.log(
`Attempting to release from branch "${releaseBranch}" using dist-tag "${distTag}".`
);
console.log(
`Attempting to release from branch "${releaseBranch}" using dist-tag "${distTag}".`
);

try {
execa.commandSync(`npm publish --tag ${distTag}`);
} catch (ex) {
console.error(ex);
Expand Down

0 comments on commit 0b2f905

Please sign in to comment.