gitmono

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 6 Imported by: 0

README

gitmono

Git wrapper for monorepos

The following commands take one or more project paths as input, that serve as the monorepo subdirectories that are considered separate projects residing in the monorepo. This tool provides commands to manage versioning of projects in monorepos.

Diff

-d flag prints out the projects whose scope matches to at least one file included in the diff of the specified reference range.

Version

-v flag extracts the latest version of the specified project. -r flag releases a new version of the specified project, after looking up for a version bump command in the commits that reference files of that project. -i flag releases a new version (v0.1.0) for the specified projects that have never been released.

Log

-l flag prints out the commits of the specified project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitParser

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

type Config

type Config struct {
	Projects      []string
	DryRun        bool
	CommitScheme  string
	VersionPrefix string
}

type Differ

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

func NewDiffer

func NewDiffer(mono *GitMono) *Differ

func (*Differ) Diff

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

type GitMono

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

GitMono contains repository instance and command parameters

func OpenCurrentRepo

func OpenCurrentRepo(config *Config) (*GitMono, error)

type Logger

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

func NewLogger

func NewLogger(mono *GitMono) *Logger

func (*Logger) CommitHashByRevision

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

func (*Logger) Log

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

type Tagger

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

func (*Tagger) Tags

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

func (*Tagger) WriteTag

func (t *Tagger) WriteTag(tagCommit *VersionedCommit) error

type VersionedCommit

type VersionedCommit struct {
	CommitID      string
	Version       *version.Version
	VersionPrefix string
	Project       string
}

func (*VersionedCommit) GetTag

func (vc *VersionedCommit) GetTag() string

type Versioner

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

func NewVersioner

func NewVersioner(mono *GitMono) *Versioner

func (*Versioner) CurrentVersion

func (v *Versioner) CurrentVersion() (*VersionedCommit, error)

func (*Versioner) InitVersion

func (v *Versioner) InitVersion() ([]*VersionedCommit, error)

func (*Versioner) NewVersion

func (v *Versioner) NewVersion() (*VersionedCommit, error)

Directories

Path Synopsis
cmd
gitmono command

Jump to

Keyboard shortcuts

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