allegro/axion-release-plugin

Plugin issues with Git worktrees

Open

#435 aberto em 20 de dez. de 2021

Ver no GitHub
 (2 comments) (1 reaction) (0 assignees)Groovy (161 forks)batch import
enhancementhacktoberfesthelp wanted

Métricas do repositório

Stars
 (628 stars)
Métricas de merge de PR
 (Mesclagem média 27d 8h) (15 fundiu PRs em 30d)

Description

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:

  1. 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 .git directory, but it is insufficient. It should also check registered worktrees.
  2. once it does not find .git directory, it tries to check other options and it crashes upon encountering config directory (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.

Guia do colaborador