https://github.com/x-motemen/gobump
Bumps up Go program version
https://github.com/x-motemen/gobump
Last synced: 26 days ago
JSON representation
Bumps up Go program version
- Host: GitHub
- URL: https://github.com/x-motemen/gobump
- Owner: x-motemen
- License: mit
- Created: 2015-06-30T04:49:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-06-12T05:10:54.000Z (almost 3 years ago)
- Last Synced: 2025-03-24T03:53:10.058Z (about 1 month ago)
- Language: Go
- Size: 6.35 MB
- Stars: 107
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
= gobump
`gobump` bumps up program version by rewriting `version`-like variable/constant values in the Go source code following http://semver.org/[SemVer].
== USAGE
Usage: gobump (major|minor|patch|up|set |show) [-w] [-v] []
Commands:
major bump major version up
minor bump minor version up
patch bump patch version up
up bump up with prompt
set 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:
[source,go]
----
package mainconst version = "2.3.4" // must follow semver spec
----If you run
gobump minor
you will get:
[source,go]
----
package mainconst 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 install github.com/x-motemen/gobump/cmd/gobump@latest
```== AUTHOR
motemen