version

package module
v0.0.0-...-7147aed Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2017 License: MIT Imports: 2 Imported by: 0

README

Version

$ export PATH="$GOPATH/bin:${PATH}"
$ go get github.com/smartystreets/version/cmd/version
$ version -help
Usage of version:

  cd to a git repository you'd like to version and run one of the following commands:

  version major
    (updates 'major' version number: 1.2.3 -> 2.0.0)
  version minor
    (updates 'minor' version number: 1.2.3 -> 1.3.0)
  version patch
    (updates 'patch' version number: 1.2.3 -> 1.2.4)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Number

type Number struct {
	Major int
	Minor int
	Patch int
	Dirty bool
}

func New

func New(major, minor, patch int, dirty bool) Number

func (Number) Increment

func (this Number) Increment(how string) Number

func (Number) IncrementMajor

func (this Number) IncrementMajor() Number

func (Number) IncrementMinor

func (this Number) IncrementMinor() Number

func (Number) IncrementPatch

func (this Number) IncrementPatch() Number

func (Number) String

func (this Number) String() string

type Repository

type Repository interface {
	CurrentVersion() (Number, error)
	UpdateVersion(Number) error
}

Directories

Path Synopsis
cmd
version command

Jump to

Keyboard shortcuts

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