feat(git): add .LatestTag template property

This commit is contained in:
Mateusz Bajorek 2023-11-01 14:35:16 +01:00 committed by Jan De Dobbeleer
parent 132756729e
commit 870ff86778
2 changed files with 5 additions and 0 deletions

View file

@ -832,3 +832,7 @@ func (g *Git) getSwitchMode(property properties.Property, gitSwitch, mode string
}
return fmt.Sprintf("%s%s", gitSwitch, mode)
}
func (g *Git) LatestTag() string {
return g.getGitCommandOutput("describe", "--tags", "--abbrev=0")
}

View file

@ -158,6 +158,7 @@ You can set the following properties to `true` to enable fetching additional inf
| `.Rebase` | `boolean` | true when in a rebase |
| `.CherryPick` | `boolean` | true when in a cherry pick |
| `.Revert` | `boolean` | true when in a revert |
| `.LatestTag` | `string` | the latest tag name |
### Status