Skip to content

elgohr/semv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semv

semv (pronounce [zɛmpf]) is a command line tool for working with semantic versions (semver).

Test Status Security Status

Installation

Go

go install github.com/elgohr/semv@latest

Binaries

Find the binaries in the releases.

Usage

Increment

Returns the incremented version.

With the version as a variable

semv increment (--patch/--minor/--major) ${currentVersion}

Piped from another command

cat oldVersion.txt | semv increment (--patch/--minor/--major)

Compare

semv compare ${firstVersion} ${secondVersion}
Result Description
-1 ${firstVersion} is lower than ${secondVersion}
0 ${firstVersion} is equal than ${secondVersion}
1 ${firstVersion} is higher than ${secondVersion}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache 2.0