cmd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetCommitLog added in v0.1.4

func GetCommitLog(commit *object.Commit) string

GetCommitLog takes a commit object and returns a commit log that may link to a pull request, for example: * [2847a2e6](../../commit/2847a2e624ee6736b43cc3a68acd75368d1a75d1) A commit message * [2847a2e6](../../commit/2847a2e624ee6736b43cc3a68acd75368d1a75d1) A commit message ([#100](../../pull/100))

func GetNewChangeLog added in v0.1.4

func GetNewChangeLog(lines []string, newContent string, index int) string

GetNewChangeLog inserts new content just before the index'th line and returns all content as string Negative index is treated as zero index (insert the new content to the beginning of the existing content) If index is greater than the length of existing content is treated as inserting to the last line of the existing content

func NewVersion

func NewVersion(ver semver.Version, releaseType string) semver.Version

NewVersion returns the next version based on the current version and next release type

func ReleaseType

func ReleaseType(major uint64, breaking, feature bool) string

ReleaseType will calculate whether the next release should be major, minor or patch

func UpdateChangeLogFile added in v0.1.4

func UpdateChangeLogFile(newContent string) error

UpdateChangeLogFile writes the changelog content of the new version to CHANGELOG.md

Types

This section is empty.

Jump to

Keyboard shortcuts

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