Skip to content

Commit

Permalink
fix: only add release please workspace plugins to monorepos (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored Aug 31, 2022
1 parent 7562777 commit 0f44075
Show file tree
Hide file tree
Showing 7 changed files with 686 additions and 12 deletions.
6 changes: 6 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ const getConfig = async ({
const derived = {
isRoot,
isWorkspace: !isRoot,
// Some files are written to the base of a repo but will
// include configuration for all packages within a monorepo
// For these cases it is helpful to know if we are in a
// monorepo since template-oss might be used only for
// workspaces and not the root or vice versa.
isMono: (isRoot && workspaces.length > 0) || !isRoot,
// repo
repoDir: root,
repoFiles,
Expand Down
5 changes: 1 addition & 4 deletions lib/content/release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"separate-pull-requests": {{{del}}},
"plugins": [
"node-workspace",
"workspace-deps"
],
"plugins": {{#if isMono}}["node-workspace", "workspace-deps"]{{else}}{{{del}}}{{/if}},
"exclude-packages-from-root": true,
"group-pull-request-title-pattern": "chore: release ${version}",
"pull-request-title-pattern": "chore: release${component} ${version}",
Expand Down
4 changes: 0 additions & 4 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"plugins": [
"node-workspace",
"workspace-deps"
],
"changelog-sections": [
{
"type": "feat",
Expand Down
Loading

0 comments on commit 0f44075

Please sign in to comment.