Skip to content

Commit

Permalink
Changed condition based on which single-package repositories are iden…
Browse files Browse the repository at this point in the history
…tified (#392)
  • Loading branch information
Andarist committed Jun 17, 2020
1 parent bac2de9 commit 9006375
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-buses-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@changesets/cli": minor
---

Changed condition based on which single-package repositories are identified when creating tags after successful publish. It is now based on whether we have recognized the repository to be managed by monorepo tooling or not.
4 changes: 2 additions & 2 deletions packages/cli/src/commands/publish/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default async function run(
showNonLatestTagWarning(tag, preState);
}

const { packages } = await getPackages(cwd);
const { packages, tool } = await getPackages(cwd);

const response = await publishPackages({
packages,
Expand All @@ -76,7 +76,7 @@ export default async function run(
// wont suffer from a race condition if another merge happens in the mean time (pushing tags wont
// fail if we are behind master).
log(`Creating git tag${successful.length > 1 ? "s" : ""}...`);
if (packages.length > 1) {
if (tool !== "root") {
for (const pkg of successful) {
const tag = `${pkg.name}@${pkg.newVersion}`;
log("New tag: ", tag);
Expand Down

0 comments on commit 9006375

Please sign in to comment.