Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.28 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.28 KB

git-version-gen

Build Status

This tool provides version auto-generation using git tags.

Installation

Makefile

Use this following syntax:

VERSION = $(shell path/to/git-version-gen.sh)

You can check an example into the Makefile on this project.

Features

  • If a file named version on the current directory exists, then it contains is read, formatted and returned.
  • If the --fallback option is given then take it, formated and return.
  • If an environment variable VERSION exists, then take it, formatted and returned.
  • If there is no git tag in the commit history, then return 0.1.0 or VERSION or --fallback value or use the value on the file version.
  • If there is no git tag in the commit history, then use the --fallback-commit option to specify a base commit hash.

Acknowledgments

This project is based on the script GIT-VERSION-GEN of the git project.

Thanks to gitster and all of contributors to the project git.