mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-21 22:10:39 +00:00
parent
946024ce0b
commit
b1b47747c1
@ -89,6 +89,7 @@ versioning: # versioning bump
|
|||||||
|
|
||||||
tag:
|
tag:
|
||||||
pattern: '%d.%d.%d' # Pattern used to create git 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:
|
release-notes:
|
||||||
# Deprecated!!! please use 'sections' instead!
|
# Deprecated!!! please use 'sections' instead!
|
||||||
|
@ -63,6 +63,7 @@ type VersioningConfig struct {
|
|||||||
// TagConfig tag preferences.
|
// TagConfig tag preferences.
|
||||||
type TagConfig struct {
|
type TagConfig struct {
|
||||||
Pattern string `yaml:"pattern"`
|
Pattern string `yaml:"pattern"`
|
||||||
|
Filter string `yaml:"filter"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==== Release Notes ====
|
// ==== Release Notes ====
|
||||||
|
@ -15,8 +15,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
logSeparator = "##"
|
logSeparator = "###"
|
||||||
endLine = "~~"
|
endLine = "~~~"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Git commands.
|
// Git commands.
|
||||||
@ -144,7 +144,7 @@ func (g GitImpl) Tag(version semver.Version) (string, error) {
|
|||||||
|
|
||||||
// Tags list repository tags.
|
// Tags list repository tags.
|
||||||
func (g GitImpl) Tags() ([]GitTag, error) {
|
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()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, combinedOutputErr(err, out)
|
return nil, combinedOutputErr(err, out)
|
||||||
|
Loading…
Reference in New Issue
Block a user