Add tag filter regex.

This commit is contained in:
Joshua Carp
2018-03-03 21:31:29 -05:00
parent 351c6d03fd
commit b708a1ce3a
6 changed files with 105 additions and 35 deletions

View File

@@ -55,7 +55,11 @@ func (c *InCommand) Run(destDir string, request InRequest) (InResponse, error) {
return InResponse{}, err
}
version := determineVersionFromTag(*foundRelease.TagName)
versionParser, err := newVersionParser(request.Source.TagFilter)
if err != nil {
return InResponse{}, err
}
version := versionParser.parse(*foundRelease.TagName)
versionPath := filepath.Join(destDir, "version")
err = ioutil.WriteFile(versionPath, []byte(version), 0644)
if err != nil {