Documentation ¶
Index ¶
- func CreateForBranch(opts *Options) error
- func CreateForRelease(opts *Options) error
- func UpdateGitHubPage(opts *GitHubPageOptions) (err error)
- type GitHubPageOptions
- type Options
- func (o *Options) WithBranch(branch string) *Options
- func (o *Options) WithChangelogFile(changelogFile string) *Options
- func (o *Options) WithChangelogHTML(changelogHTML string) *Options
- func (o *Options) WithChangelogPath(changelogPath string) *Options
- func (o *Options) WithTag(tag string) *Options
- func (o *Options) WithWorkDir(workDir string) *Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateForBranch ¶
func CreateForRelease ¶
func UpdateGitHubPage ¶ added in v0.6.0
func UpdateGitHubPage(opts *GitHubPageOptions) (err error)
UpdateGitHubPage updates a github page with data from the release
Types ¶
type GitHubPageOptions ¶ added in v0.6.0
type GitHubPageOptions struct { // ReleaseType indicates if we are dealing with an alpha, // beta, rc or official ReleaseType string // AssetFiles is a list of paths of files to be uploaded // as assets of this release AssetFiles []string // Tag is the release the github page will be edited Tag string // The release can have a name Name string // Owner GitHub organization which owns the repository Owner string // Name of the repository where we will publish the // release page. The specified tag has to exist there already Repo string // Run the whole process in non-mocked mode. Which means that it uses // production remote locations for storing artifacts and modifying git // repositories. NoMock bool // Create a draft release Draft bool // If the release exists, we do not overwrite the release page // unless specified so. UpdateIfReleaseExists bool // We can use a custom page template by spcifiying the path. The // file is a go template file that renders markdown. PageTemplate string // We automatizally calculate most values, but more substitutions for // the template can be supplied Substitutions map[string]string }
GitHubPageOptions data for building the release page
func (*GitHubPageOptions) ParseSubstitutions ¶ added in v0.6.0
func (o *GitHubPageOptions) ParseSubstitutions(subs []string) error
ParseSubstitutions gets a slice of strings with the substitutions for the template and parses it as Substitutions in the options
func (*GitHubPageOptions) ReadTemplate ¶ added in v0.6.0
func (o *GitHubPageOptions) ReadTemplate(templatePath string) error
ReadTemplate reads a custom template from a file and sets the PageTemplate option with its content
func (*GitHubPageOptions) SetRepository ¶ added in v0.6.0
func (o *GitHubPageOptions) SetRepository(repoSlug string) error
SetRepository takes a repository slug in the form org/repo, paeses it and assigns the values to the options
func (*GitHubPageOptions) Validate ¶ added in v0.6.0
func (o *GitHubPageOptions) Validate() error
Validate the GitHub page options to ensure they are correct
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions() *Options
NewOptions can be used to create a new Options instance
func (*Options) WithBranch ¶
func (*Options) WithChangelogFile ¶ added in v0.7.0
func (*Options) WithChangelogHTML ¶
func (*Options) WithChangelogPath ¶
func (*Options) WithWorkDir ¶
Click to show internal directories.
Click to hide internal directories.