Skip to content

Commit

Permalink
enable use of from-git for lerna deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
dahukish committed May 18, 2021
1 parent 54fa758 commit eb50077
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/snippets/publish-lerna-independent-packages
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const taggedPackages = execSync("git tag --points-at HEAD")
const hasBetaRelease = taggedPackages.some((version) =>
version.includes("-beta")
);

// set this using machine.environment.SHIPIT_LERNA_PUBLISH_FROM_GIT in your shipit.yml
const useFromGit = process.env.SHIPIT_LERNA_PUBLISH_FROM_GIT || false;

if (
hasBetaRelease &&
!taggedPackages.every((version) => version.includes("-beta"))
Expand All @@ -32,7 +36,7 @@ function distTag() {

const command = [
"node_modules/.bin/lerna publish",
"from-package",
useFromGit ? "from-git" : "from-package",
"--yes",
`--dist-tag ${distTag()}`,
];
Expand Down

0 comments on commit eb50077

Please sign in to comment.