Auto Versioning with Git in Visual C++ -


i have c++ project in vs2013. in past on similar projects i've used subwcrev subversion auto generate version numbers. had template file :

#define major_version       2 #define minor_version       2 #define micro_version       0 #define build_version       $wcmods?$wcrev$+1:$wcrev$$  #define quote_(x) #x #define quote(x) quote_(x)  #define build_version_string    quote(major_version.minor_version.micro_version.build_version) 

then ran subwcrev pre-build step generate header file included in project define version numbers.

i'm using git , want similar. know git doesn't have equivalent of revision number head sha fine.

it doesn't seem there's equivalent way git , need scripting isn't strong point. git guru point me in right direction achieve this?

i've found useful batch file way more need :

https://github.com/thell/git-vs-versioninfo-gen

it similar job subwcrev , generates header file can include in vs project set version strings. after bit of hacking around script i've got wanted.

there's c# version here :

https://github.com/jasperboot/git-vs-versioninfo


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -