gradle-semantic-release-plugin icon indicating copy to clipboard operation
gradle-semantic-release-plugin copied to clipboard

Support multi-project builds

Open fairbanksg opened this issue 3 years ago • 1 comments

I have a repo with several projects that I publish independently. I am using semantic-release-plus for its support for filtering commits to a specific path, to only publish each project when it actually has changes. The one snag is that I want to run semantic-release-plus from the subproject directory, so that only that project will be published. However, that doesn't work since the gradlew script is in the root project directory, so it is not found.

I can make a PR for this, but was curious on thoughts on how best to allow this. I see several options:

  1. Allow running from the subproject directory by looking for ../gradlew if ./gradlew is not found.
  2. Allow running from the root project directory by adding an option to set the -p flag to gradle, to scope the tasks to that subproject only.

fairbanksg avatar May 04 '22 19:05 fairbanksg

The 2nd option seems too free and abstract, so I prefer the 1st option at this moment. I mean, if we implement the 2nd option, some users may use it for unintended usage.

Note that the semantic-release itself does not support monorepo at this moment. In other words, semantic-release still has a chance to support monorepo natively. So I have less motivation to implement features that work only for semantic-release related tools (in this case semantic-release-plus).

The suggested change should be effective even for who do not use semantic-release-plus, so it is welcome to share your idea via PR then I will review and merge it. :)

KengoTODA avatar May 04 '22 23:05 KengoTODA