Skip to content

leifcr/gitrevision-batch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Git version script for Windows

You need to have 'sed' and 'git' installed in order for this script to work.

Your git tags must be in format v1.0.123

1 is major version

0 is minor version

123 is revision number

Usage

  gitversion.bat git_repo_folder input_file output_file

Usage example:

  gitversion.bat c:\path\to\my\git\repository file_with_version_codes.h version.h

Parameters changed in input file:

  • $MAJOR_VERSION$ - the major version number
  • $MINOR_VERSION$ - the minor version number
  • $REVISION$ - the revision number
  • $COMMITS_SINCE_TAG$ - number of commits since last tag
  • $GIT_TAG_HASH$ - git hash for the tag
  • $GIT_HASH$ - the current git hash will be same as GIT_HASH if the current tag is checked out)

Copyright (c) 2012 Leif Ringstad, released under the MIT license

About

Windows git revision batch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published