2019-06-15 23:03:27 +02:00
|
|
|
package shared
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/Masterminds/semver"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
//ReleaseVersion struct
|
|
|
|
|
type ReleaseVersion struct {
|
2019-08-13 23:01:38 +02:00
|
|
|
Last ReleaseVersionEntry `yaml:"last"`
|
|
|
|
|
Next ReleaseVersionEntry `yaml:"next"`
|
|
|
|
|
Branch string `yaml:"branch"`
|
2019-08-11 18:27:52 +02:00
|
|
|
Commits map[Release][]AnalyzedCommit `yaml:"commits"`
|
2019-06-15 23:03:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ReleaseVersionEntry struct
|
|
|
|
|
type ReleaseVersionEntry struct {
|
2019-08-13 23:01:38 +02:00
|
|
|
Commit string `yaml:"commit"`
|
|
|
|
|
VersionString string `yaml:"version"`
|
2019-08-11 18:27:52 +02:00
|
|
|
Version *semver.Version `yaml:"-"`
|
2019-06-15 23:03:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//GeneratedChangelog struct
|
|
|
|
|
type GeneratedChangelog struct {
|
|
|
|
|
Title string
|
|
|
|
|
Content string
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-20 00:46:59 +02:00
|
|
|
//ChangelogTemplateConfig struct
|
2019-06-15 23:03:27 +02:00
|
|
|
type ChangelogTemplateConfig struct {
|
|
|
|
|
CommitURL string
|
|
|
|
|
CompareURL string
|
|
|
|
|
Hash string
|
|
|
|
|
Version string
|
|
|
|
|
}
|
2019-08-11 18:27:52 +02:00
|
|
|
|
|
|
|
|
//AnalyzedCommit struct
|
|
|
|
|
type AnalyzedCommit struct {
|
|
|
|
|
Commit Commit `yaml:"commit"`
|
|
|
|
|
ParsedMessage string `yaml:"parsedMessage"`
|
|
|
|
|
Scope Scope `yaml:"scope"`
|
|
|
|
|
ParsedBreakingChangeMessage string `yaml:"parsedBreakingChangeMessage"`
|
|
|
|
|
Tag string `yaml:"tag"`
|
|
|
|
|
TagString string `yaml:"tagString"`
|
|
|
|
|
Print bool `yaml:"print"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Scope of the commit, like feat, fix,..
|
|
|
|
|
type Scope string
|
|
|
|
|
|
|
|
|
|
//Release types, like major
|
|
|
|
|
type Release string
|
|
|
|
|
|
|
|
|
|
// Commit struct
|
|
|
|
|
type Commit struct {
|
|
|
|
|
Message string `yaml:"message"`
|
|
|
|
|
Author string `yaml:"author"`
|
|
|
|
|
Hash string `yaml:"hash"`
|
|
|
|
|
}
|