Skip to content

v1.0.0

Choose a tag to compare

@andreimerlescu andreimerlescu released this 27 Jul 16:12
72e0ed5

This is the initial public release of bump! 🎉 This release provides a stable, tested command-line tool and a Go package for managing semantic version strings. The build has passed all unit, benchmark, and fuzz tests.


Build Artifacts

Pre-compiled binaries for the CLI are available for the following targets:

  • bump-darwin-amd64
  • bump-darwin-arm64
  • bump-linux-amd64
  • bump-linux-arm64
  • bump.exe (windows/amd64)

bump/ Package API

This release exposes the bump package for programmatic use in your own Go projects.

Exported Struct

  • Version: Holds all parsed components of a version string (Major, Minor, Patch, Alpha, Beta, RC, Preview).

Exported Constants & Variables

  • const: TypeA, TypeB, TypeC, TypeD, TypeE, TypeF are exported string constants for different version formats.
  • var Types: A map that associates each version format type with the expected number of arguments from a scan operation.

Exported Functions & Methods

  • func (v *Version) BumpMajor(): Increments the major version and resets all lower-order fields.
  • func (v *Version) BumpMinor(): Increments the minor version and resets patch and pre-release fields.
  • func (v *Version) BumpPatch(): Increments the patch version and resets pre-release fields.
  • func (v *Version) BumpAlpha(): Increments the alpha version number.
  • func (v *Version) BumpBeta(): Increments the beta version number.
  • func (v *Version) BumpRC(): Increments the release candidate number.
  • func (v *Version) BumpPreview(): Increments the preview number.
  • func (v *Version) Compare(other *Version) int: Compares two Version structs according to semantic versioning precedence.
  • func (v *Version) LoadFile(path string) error: Reads a version file's content into the Version's raw field.
  • func (v *Version) ParseFile(path string) error: Loads and parses a version from a specified file path.
  • func (v *Version) Raw() string: Returns the original byte slice read from the file as a string.
  • func (v *Version) Save(path string) error: Writes the current version string to a specified file.
  • func (v *Version) Scan() error: Parses the raw version string into the Version struct fields.
  • func (v *Version) String() string: Formats the Version struct into a standardized string.