axion-release-plugin
axion-release-plugin copied to clipboard
Plugin issues with Git worktrees
I would like to use Git worktrees to work on two tasks in parallel (e.g. one worktree for my primary work, second worktree for emergency fixes). Unfortunately there are a couple of issues with Axion Release Plugin, when working in this way:
- in the second worktree, the plugin does not recognize that it is in a Git repository. It looks like it only checks for the presence of
.gitdirectory, but it is insufficient. It should also check registered worktrees. - once it does not find
.gitdirectory, it tries to check other options and it crashes upon encounteringconfigdirectory (it expects the file)
Point 2 is also not valid. If the plugin notices config directory while expecting a file, it should silently skip it instead of crashing. Many tools use config directory (Checkstyle, PMD to mention some) and in my case, they auto-generate the basic configuration every time I launch Gradle, and I need to remove this directory manually over and over again just to make it work.
Example output:
Build file '/path/to/my/project/build.gradle.kts' line: 87
java.io.FileNotFoundException: /path/to/my/project/config (Is a directory)
> /path/to/my/project/config (Is a directory)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
hi, seems fair to detect registered worktrees, care to make a PR? :)