gitmono

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 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

This section is empty.

Functions

This section is empty.

Types

type CommitParse

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

CommitParse implements commit parsing

func NewCommitParse

func NewCommitParse(monorepo *gitmono.MonoRepo) *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(monorepo *gitmono.MonoRepo) *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(monorepo *gitmono.MonoRepo) *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(monorepo *gitmono.MonoRepo) *Tag

NewTag creates a new tagger instance

func (*Tag) CreateTag

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

CreateTag create a tag on the provided commit

func (*Tag) Tags

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

Tags retrieves all repository tags

type Version

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

Version combines git commands to read and write releases

func NewVersion

func NewVersion(monorepo *ctx.MonoRepo, 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