Documentation ¶
Overview ¶
Code to automatically bump versions
Index ¶
Constants ¶
View Source
const ( MAJOR = iota // MAJOR bump flag MINOR // MINOR bump flag PATCH // PATCH bump flag )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bump ¶
type Bump interface { VersionRegex(regex *string) error Version() string BumpVersion(part int) error }
func NewBumpFile ¶
Opens a new bump file for reading. Note that the Bump interface is returned not BumpFile
type BumpFile ¶
type BumpFile struct { Bump // contains filtered or unexported fields }
Bump Version contained in a file. By default Do not instantiate using BumpFile instead use NewBumpFile()
func (*BumpFile) BumpVersion ¶
Atomically writes the version to file. msg *string is not currently implimented
MAJOR version bump:
f.BumpVersion(internal.MAJOR) f.BumpVersion(0)
MINOR version bump:
f.BumpVersion(internal.MINOR) f.BumpVersion(1)
PATCH version bump:
f.BumpVersion(internal.PATCH) f.BumpVersion(2)
type Version ¶
type Version struct { Patch int // contains filtered or unexported fields }
Version section struct The version will follow semver.
func NewVersion ¶
Create version struct from parsed string
Click to show internal directories.
Click to hide internal directories.