feat(config): add option for draft, prerelease, provider: user, accesstoken

This commit is contained in:
Felix Wiedmann
2019-06-05 22:22:06 +02:00
parent 2dd59be362
commit 4011cd5a8c

View File

@@ -18,11 +18,15 @@ type ChangelogConfig struct {
// GithubConfig struct // GithubConfig struct
type GithubConfig struct { type GithubConfig struct {
URL string `yaml:"url"` URL string `yaml:"url"`
User string `yaml:"user"`
AccessToken string `yaml:"accessToken"`
} }
// GitlabConfig struct // GitlabConfig struct
type GitlabConfig struct { type GitlabConfig struct {
URL string `yaml:"url"` URL string `yaml:"url"`
User string `yaml:"user"`
AccessToken string `yaml:"accessToken"`
} }
type Asset struct { type Asset struct {
@@ -36,9 +40,10 @@ type ReleaseConfig struct {
Branch map[string]string `yaml:"branch"` Branch map[string]string `yaml:"branch"`
Changelog ChangelogConfig `yaml:"changelog,omitempty"` Changelog ChangelogConfig `yaml:"changelog,omitempty"`
Release string `yaml:"release,omitempty"` Release string `yaml:"release,omitempty"`
Github map[string]string `yaml:"github"` Github GitlabConfig `yaml:"github, omitempty"`
Gitlab map[string]string `yaml:"gitlab"` Gitlab GitlabConfig `yaml:"gitlab, omitempty"`
Assets []Asset `yaml:"assets"` Assets []Asset `yaml:"assets"`
IsPreRelease, IsDraft bool
} }
// Read ReleaseConfig // Read ReleaseConfig
@@ -57,5 +62,7 @@ func Read(configPath string) (*ReleaseConfig, error) {
log.Debugf("Found config %+v", releaseConfig) log.Debugf("Found config %+v", releaseConfig)
return &releaseConfig, nil return &ReleaseConfig{
IsPreRelease: false,
IsDraft: false}, nil
} }