Skip to content

Commit

Permalink
enhance README with external branch name providing on detached HEAD
Browse files Browse the repository at this point in the history
fixes #89
  • Loading branch information
McFoggy committed Jul 5, 2018
1 parent f6608a4 commit ef8eec9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ Please consult [jgitver](https://github.com/jgitver/jgitver#configuration-modes-
- `-Djgitver.config=FILE` : overrides default config file and uses FILE instead
- `-Djgitver.use-version=VERSION` : execute jgitver but finally uses VERSION as the project version

#### Working on a detached HEAD

When working on a detached HEAD, no branch information exists anymore from git.
Since `1.3.0` it now possible to provide externally the _branch_ information via a system property or an envrionement variable.

- `-Djgitver.branch=SOME_BRANCH_NAME`
- `JGITVER_BRANCH=SOME_BRANCH_NAME && mvn validate` for bash like shells
- `SET JGITVER_BRANCH=SOME_BRANCH_NAME`
`mvn validate`
for windows CMD (I don't know a one iner solution)


### Available properties

Since `0.2.0`, the plugin exposes git calculated properties available during the maven build.
Expand Down

0 comments on commit ef8eec9

Please sign in to comment.