announce

package
v0.16.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateForBranch

func CreateForBranch(opts *Options) error

func CreateForRelease

func CreateForRelease(opts *Options) error

func GenerateReleaseSBOM added in v0.13.0

func GenerateReleaseSBOM(opts *SBOMOptions) (string, error)

GenerateReleaseSBOM creates an SBOM describing the release

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 Asset added in v0.13.0

type Asset struct {
	Path     string // Path where the artifact will be listed
	ReadFrom string // LocalPath to read the information
	Label    string // Label for the asset
}

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

	// File to read the release notes from
	ReleaseNotesFile 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 (o *Options) WithBranch(branch string) *Options

func (*Options) WithChangelogFile added in v0.7.0

func (o *Options) WithChangelogFile(changelogFile string) *Options

func (*Options) WithChangelogHTML

func (o *Options) WithChangelogHTML(changelogHTML string) *Options

func (*Options) WithChangelogPath

func (o *Options) WithChangelogPath(changelogPath string) *Options

func (*Options) WithTag

func (o *Options) WithTag(tag string) *Options

func (*Options) WithWorkDir

func (o *Options) WithWorkDir(workDir string) *Options

type SBOMFormat added in v0.16.0

type SBOMFormat string
const (
	FormatJSON     SBOMFormat = "json"
	FormatTagValue SBOMFormat = "tag-value"
)

type SBOMOptions added in v0.13.0

type SBOMOptions struct {
	ReleaseName   string
	Repo          string
	RepoDirectory string
	Tag           string     // Version Tag
	Format        SBOMFormat // "tag-value"  | "json"
	Assets        []Asset
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL