All Projects → meinto → git-semver

meinto / git-semver

Licence: MIT License
a small cli tool to version your git repository with semantic versioning

Programming Languages

go
31211 projects - #10 most used programming language
ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to git-semver

gradle-versioner
Gradle Version Plugin. Generates semantic versions with git meta data per branch.
Stars: ✭ 25 (+31.58%)
Mutual labels:  semver, semantic-versioning
Python Semver
Python package to work with Semantic Versioning (http://semver.org/)
Stars: ✭ 264 (+1289.47%)
Mutual labels:  semver, semantic-versioning
bump
🌻 CLI tool to draft a GitHub Release for the next semantic version
Stars: ✭ 40 (+110.53%)
Mutual labels:  semver, semantic-versioning
React Native Version
🔢 Version your React Native or Expo app in a `npm version` fashion.
Stars: ✭ 408 (+2047.37%)
Mutual labels:  semver, semantic-versioning
Semver
Semantic Versioning for modern C++
Stars: ✭ 108 (+468.42%)
Mutual labels:  semver, semantic-versioning
Semver
Semantic versioning helper library for PHP
Stars: ✭ 144 (+657.89%)
Mutual labels:  semver, semantic-versioning
next-ver
Tells you the next semantic version for your local package
Stars: ✭ 27 (+42.11%)
Mutual labels:  semver, semantic-versioning
Commitizen
Create committing rules for projects 🚀 auto bump versions ⬆️ and auto changelog generation 📂
Stars: ✭ 477 (+2410.53%)
Mutual labels:  semver, semantic-versioning
Semver
Semantic Versioning (semver) library written in golang
Stars: ✭ 804 (+4131.58%)
Mutual labels:  semver, semantic-versioning
Semantic Release
📦🚀 semantic-release written in go
Stars: ✭ 113 (+494.74%)
Mutual labels:  semver, semantic-versioning
Version
Represent and compare versions via semantic versioning (SemVer) in Swift
Stars: ✭ 160 (+742.11%)
Mutual labels:  semver, semantic-versioning
semantics
A utility written in Golang to automatically handle Semantic Versioning in a CI environment.
Stars: ✭ 19 (+0%)
Mutual labels:  semantic-versioning
semver-generator
Semantic version generator using git commit keywords and overrides
Stars: ✭ 26 (+36.84%)
Mutual labels:  semver
terraform-module-versions
CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform
Stars: ✭ 143 (+652.63%)
Mutual labels:  semver
gradle-release-plugin
Gradle plugin providing very minimal release version numbering (Git-specific)
Stars: ✭ 43 (+126.32%)
Mutual labels:  semantic-versioning
koji
🦊 An interactive CLI for creating conventional commits.
Stars: ✭ 25 (+31.58%)
Mutual labels:  semver
semver
Kotlin data class for Semantic Versioning 2.0.0 specification (SemVer)
Stars: ✭ 51 (+168.42%)
Mutual labels:  semver
cocogitto
The Conventional Commits toolbox
Stars: ✭ 242 (+1173.68%)
Mutual labels:  semver
sv
libsv - Public domain cross-platform semantic versioning in c99
Stars: ✭ 46 (+142.11%)
Mutual labels:  semantic-versioning
breakcheck
Backwards compatibility linter for Go.
Stars: ✭ 66 (+247.37%)
Mutual labels:  semver

git-semver: A cli tool for versioning your git repository

Why

There is no standardized way to version a git repository. Node applications store their version in a package.json, other appications store it in a Makefile or somewhere else.

What i want is small cli tool that handles the version of my repository, no matter what technology is under the hood.

Installation

brew

brew tap meinto/git-semver https://github.com/meinto/git-semver
brew install meinto/git-semver/git-semver

manually

Download the corresponding latest binary and run the install command. Right now the install command is only valid for mac and linux.

<name-of-binary> install

You can use semver as a gitplugin by using the following syntax:

git semver version ...

Usage

By default this cli tool uses a VERSION file in the root folder of a git repository to store the version. The versioning is built up on semantic versioning.

semver version [major|minor|patch] \
  [--dryrun] \                        # default: false -- only show how version would change
  [-p <path-to-repo>] \               # default: .
  [-f <version-file-name>] \          # default: VERSION -- define alternative version file
  [-t <version-file-type>] \          # default: raw -- you can set the values "json" or "raw"
  [--tag] \                           # default: false -- tag the commit with the new version
  [--push] \                          # default: false -- push all changes made by semver

You can create an individual semver.config.json file in the root of your project to override the default values of the flags. Simply run the semver init command and follow the instructions.

Custom version file

By default semver lookup the VERSION file in the current directory. If you want to store your version in a custom file use the flag -f.

If you prefer a json file which contains the version number in a version property you can do this by using the flags -f in combination with -t:

Auto file type detection will be implemented in the next release.
If you can't wait, please send a pull request :)

semver version minor -f package.json -t json

If your defined version file is of type json, the cli tool only overrides the property version and leaves other properties untouched.

Create git tag

With the flag --tag or short -T, semver will create a git tag of the new version e.g.: v1.0.0.

Push version changes

semver writes the new version back into the version file. As described, you can also tag the commit using the flag -T. To automatically push these changes made by semver, use the flag --push or short -P.

Get Version(s)

With the get command you can get the current or next possible versions.

semver get         # will print the current version
semver get major   # will print the next major version
semver get minor   # will print the next minor version
semver get patch   # will print the next patch version

With the --raw or short -r flag you will get the plain number without description. For example:

semver get minor --raw

Contribute

Create a fork, make your changes, and send a pull request. 😎

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].