mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-24 11:10:39 +00:00
parent
946024ce0b
commit
b1b47747c1
@ -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!
|
||||
|
@ -63,6 +63,7 @@ type VersioningConfig struct {
|
||||
// TagConfig tag preferences.
|
||||
type TagConfig struct {
|
||||
Pattern string `yaml:"pattern"`
|
||||
Filter string `yaml:"filter"`
|
||||
}
|
||||
|
||||
// ==== Release Notes ====
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user