bump

package module
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 9 Imported by: 0

README

gh bump

a gh extension for bumping version of a repository.

image

Usage

gh bump

with another repository.

gh bump -R <repository>

If you want to see more detail about this extension, you can run below.

gh bump -h

Installation

gh extension install johnmanjiro13/gh-bump

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBumpType = errors.New("invalid bump type")

Functions

func NewBumper

func NewBumper(gh Gh) *bumper

func NewGh

func NewGh() *ghCLI

func NewRootCmd

func NewRootCmd(bumper Bumper) *cobra.Command

Types

type BumpType

type BumpType string
const (
	Major BumpType = "major"
	Minor BumpType = "minor"
	Patch BumpType = "patch"
	Blank BumpType = ""
)

func ParseBumpType

func ParseBumpType(s string) (BumpType, error)

func (BumpType) IsBlank

func (b BumpType) IsBlank() bool

func (BumpType) String

func (b BumpType) String() string

func (BumpType) Valid

func (b BumpType) Valid() error

type Bumper

type Bumper interface {
	Bump() error
	WithRepository(repository string) error
	WithDraft()
	WithPrerelease()
	WithDiscussionCategory(category string)
	WithGenerateNotes()
	WithNotes(notes string)
	WithNotesFile(filename string)
	WithTitle(title string)
	WithTarget(target string)
	WithAssetFiles(files []string)
	WithBumpType(bumpType string) error
	WithYes()
}

type Gh

type Gh interface {
	ViewRepository() (sout, eout *bytes.Buffer, err error)
	ListRelease(repo string, isCurrent bool) (sout, eout *bytes.Buffer, err error)
	ViewRelease(repo string, isCurrent bool) (sout, eout *bytes.Buffer, err error)
	CreateRelease(version string, repo string, isCurrent bool, option *ReleaseOption) (sout, eout *bytes.Buffer, err error)
}

type Prompter added in v0.8.0

type Prompter interface {
	Input(question string, validator survey.Validator) (string, error)
	Select(question string, options []string) (string, error)
	Confirm(question string) (bool, error)
}

type ReleaseOption

type ReleaseOption struct {
	IsDraft            bool
	IsPrerelease       bool
	DiscussionCategory string
	GenerateNotes      bool
	Notes              string
	NotesFilename      string
	Target             string
	Title              string
	AssetFiles         []string
}

Directories

Path Synopsis
cmd
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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