gitmono

package
v0.12.12 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoCommitsRelease signals that no commit exist so failing the release
	ErrNoCommitsRelease = fmt.Errorf("no commits to release")
)

Functions

This section is empty.

Types

type CommitParse

type CommitParse struct {
	// contains filtered or unexported fields
}

CommitParse implements commit parsing

func NewCommitParse

func NewCommitParse(config *gitmono.Config) *CommitParse

NewCommitParse creates a new commit parser

func (*CommitParse) GetBumperFromCommit

func (cp *CommitParse) GetBumperFromCommit(commit *git.Commit) gitmono.Bumper

GetBumperFromCommit parses commit message based on scheme

Returns the bumper to use for this commit or nil

type Diff

type Diff struct {
	// contains filtered or unexported fields
}

Diff performs diff operation for a monorepo.

func NewDiff

func NewDiff(differ gitmono.GitDiffer, config *gitmono.Config) *Diff

NewDiff creates a new differ instance.

func (*Diff) Diff

func (d *Diff) Diff(from, to string) ([]string, error)

Diff performs diff for the provided git references range Matches changed files to the provided monorepo project and return the list of files

type Log

type Log struct {
	// contains filtered or unexported fields
}

Log performs log operation for the specifed monorepo project

func NewLog

func NewLog(logger gitmono.GitLogger, config *gitmono.Config) *Log

NewLog creates a new logger instance

func (*Log) CommitHashByRevision

func (l *Log) CommitHashByRevision(rev string) (string, error)

CommitHashByRevision lookup the commit hash for a revision/reference.

func (*Log) Log

func (l *Log) Log(from, to string) ([]*git.Commit, error)

Log performs log operation for the provided git references range and monorepo project

type Tag

type Tag struct {
	// contains filtered or unexported fields
}

Tag performs tag operation for a monorepo

func NewTag

func NewTag(tagger gitmono.GitTagger, config *gitmono.Config, envVars *gitmono.EnvVars) *Tag

NewTag creates a new tagger instance

func (*Tag) CreateTag

func (t *Tag) CreateTag(versionedCommit *gitmono.VersionedCommit) error

CreateTag create an annotated tag on the provided commit

func (*Tag) ListProjectVersionTags added in v0.10.0

func (t *Tag) ListProjectVersionTags() ([]string, error)

ListProjectVersionTags retrieves all project tags ordered by descending version value

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version combines git commands to read and write releases

func NewVersion

func NewVersion(config *ctx.Config, logger ctx.Logger, tagger ctx.Tagger, commitParser ctx.CommitParser) *Version

NewVersion creates a new version instance

func (*Version) GetCurrentVersion

func (v *Version) GetCurrentVersion() (*ctx.VersionedCommit, error)

GetCurrentVersion retrieves the current version

func (*Version) InitVersion

func (v *Version) InitVersion(commitID string) (*ctx.VersionedCommit, error)

InitVersion identifies checks if project has version and releases the initial version

func (*Version) ReleaseNewVersion

func (v *Version) ReleaseNewVersion(commitID string) (*ctx.VersionedCommit, error)

ReleaseNewVersion calculates the new version and performs release

Returns an error if there are no new commits for the provided project

Jump to

Keyboard shortcuts

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