Skip to content
master
Go to file
Code

Latest commit

## [v0.2.0](v0.1.0...v0.2.0) (2020-01-24)

* update deps [#17](#17) ([Songmu](https://github.com/Songmu))
* update module name to github.com/x-motemen/gobump [#16](#16) ([Songmu](https://github.com/Songmu))
699276e

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.adoc

gobump

gobump bumps up program version by rewriting version-like variable/constant values in the Go source code following SemVer.

USAGE

Usage: gobump (major|minor|patch|up|set <version>|show) [-w] [-v] [<path>]
Commands:
  major             bump major version up
  minor             bump minor version up
  patch             bump patch version up
  up                bump up with prompt
  set <version>     set exact version (no increments)
  show              only show the versions (implies -v)
Flags:
  -v=false: show the resulting version values
  -w=false: write result to (source) file instead of stdout

EXAMPLE

Suppose you have a source file:

package main

const version = "2.3.4" // must follow semver spec

If you run

gobump minor

you will get:

package main

const version = "2.4.0"

Use -w to rewrite the file in-place.

Other options:

gobump major     # 2.3.4 -> 3.0.0
gobump minor     # 2.3.4 -> 2.4.0
gobump patch     # 2.3.4 -> 2.3.5
gobump set 5.5.5 # 2.3.4 -> 5.5.5

INSTALL

go get github.com/x-motemen/gobump/cmd/gobump

AUTHOR

motemen

You can’t perform that action at this time.