test(*): add unit tests

This commit is contained in:
Nightapes
2019-07-21 15:07:13 +02:00
parent 69db52e5b1
commit 791983faae
12 changed files with 477 additions and 27 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"io/ioutil"
"strings"
"time"
"github.com/Masterminds/semver"
"github.com/Nightapes/go-semantic-release/internal/analyzer"
@@ -199,7 +200,7 @@ func (s *SemanticRelease) GetChangelog(releaseVersion *shared.ReleaseVersion) (*
log.Debugf("Found %d commits till last release", len(commits))
c := changelog.New(s.config, s.analyzer.GetRules())
c := changelog.New(s.config, s.analyzer.GetRules(), time.Now())
return c.GenerateChanglog(shared.ChangelogTemplateConfig{
Version: releaseVersion.Next.Version.String(),
Hash: releaseVersion.Last.Commit,