diff --git a/README.md b/README.md index 6ecb2d2..210c0dd 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ versioning: # versioning bump tag: pattern: '%d.%d.%d' # Pattern used to create git tag. + filter: '' # Enables you to filter for considerable tags using git pattern syntax release-notes: # Deprecated!!! please use 'sections' instead! diff --git a/sv/config.go b/sv/config.go index 694b815..64437cd 100644 --- a/sv/config.go +++ b/sv/config.go @@ -63,6 +63,7 @@ type VersioningConfig struct { // TagConfig tag preferences. type TagConfig struct { Pattern string `yaml:"pattern"` + Filter string `yaml:"filter"` } // ==== Release Notes ==== diff --git a/sv/git.go b/sv/git.go index 7474824..a15afa8 100644 --- a/sv/git.go +++ b/sv/git.go @@ -15,8 +15,8 @@ import ( ) const ( - logSeparator = "##" - endLine = "~~" + logSeparator = "###" + endLine = "~~~" ) // Git commands. @@ -144,7 +144,7 @@ func (g GitImpl) Tag(version semver.Version) (string, error) { // Tags list repository tags. func (g GitImpl) Tags() ([]GitTag, error) { - cmd := exec.Command("git", "for-each-ref", "--sort", "creatordate", "--format", "%(creatordate:iso8601)#%(refname:short)", "refs/tags") + cmd := exec.Command("git", "for-each-ref", "--sort", "creatordate", "--format", "%(creatordate:iso8601)#%(refname:short)", "refs/tags/" + g.tagCfg.Filter) out, err := cmd.CombinedOutput() if err != nil { return nil, combinedOutputErr(err, out)