[go: up one dir, main page]

Add configuration option to force Collector to always create worktree

In the case the content source (the origin) is a local worktree, it should be possible to configure Collector to bypass this worktree and always create a dedicated one. It should be possible to set this option globally on the extension or per origin (in antora.yml). The per origin setting overrides the global options.

The global option should be named create_worktrees. The per origin option should be a key named create on the worktree key. The permitted values are auto and always. The value auto means to reuse the worktee of the origin, if available. The value always means to create a new worktree even if the origin already has a worktree.

For example:

ext:
  collector:
    worktree:
      create: always
    run:
      command: run-in-managed-worktree

If the value of the collector key is an array, only the worktree key on the first entry is considered.

The purpose of this configuration option is to be enforce consistency even when a local worktree is being used as a content source, such as for development.