Add SHA to versions

This commit is contained in:
Ed
2018-12-18 12:56:09 -05:00
parent b747989d43
commit 6f0e6ea3ca
6 changed files with 24 additions and 15 deletions

View File

@@ -2,6 +2,8 @@ package resource
import (
"regexp"
"github.com/xanzy/go-gitlab"
)
var defaultTagFilter = "^v?([^v].*)"
@@ -28,3 +30,10 @@ func (vp *versionParser) parse(tag string) string {
}
return ""
}
func versionFromTag(tag *gitlab.Tag) Version {
return Version{
Tag: tag.Name,
CommitSHA: tag.Commit.ID,
}
}