Allow current branch to be specified in playbook using a token
The worktree is only used if the current branch matches one of the branches specified in the content source. But the writer is likely going to be making changes on a local feature branch. To save the writer from having to continually updating the playbook spec to include the current branch, it should be possible for the writer to specify a token that tracks the current branch name.
Add support for a token to the playbook that resolves to the current branch name. For example:
content:
sources:
- url: .
- branches: $CURRENT_BRANCH
(an alternative value to consider is .
, building on the meaning of .
for current directory)
This feature could also be useful in CI if the current branch is selected dynamically.