semrel

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSemanticReleaseCommand

func CreateSemanticReleaseCommand() *cobra.Command

CreateSemanticReleaseCommand creates the root Semantic Release command

Types

type Change

type Change struct {
	Commit        git.Commit
	Major         bool
	Minor         bool
	ParsedMessage ParsedCommitMessage
}

Change represents a change that will go out

func CalculateChange

func CalculateChange(commit git.Commit) Change

CalculateChange calculates a changed out of a commit

func (Change) String

func (c Change) String() string

type ParsedCommitMessage

type ParsedCommitMessage struct {
	Body    string
	Footer  string
	Scope   string
	Subject string
	Type    string
}

ParsedCommitMessage represents a commit message that was parsed from a message in the format followed by the Semantic Release format. This format was adopted from the Angular.js community and you can read more here: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines

func ParseCommitMessage

func ParseCommitMessage(commitMessage string) *ParsedCommitMessage

ParseCommitMessage parses a commit message

type Release

type Release struct {
	Changes []Change
	Version semver.Version
}

Release represents a group of changes that will be released

func CalculateNextRelease

func CalculateNextRelease(latestVersion semver.Version, commits []git.Commit) (Release, error)

CalculateNextRelease will calculate what will go out in the next release, and if it is a major, minor or patch change.

func (Release) ChangeLog

func (release Release) ChangeLog() string

ChangeLog returns a string representing the change log for the release, in markdown format

func (Release) ChangesByType

func (release Release) ChangesByType() map[string][]Change

ChangesByType group the changes for the release by their type

Jump to

Keyboard shortcuts

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