Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples to increase the counters. #49

Closed
paulpogostick opened this issue Jul 18, 2017 · 0 comments
Closed

Examples to increase the counters. #49

paulpogostick opened this issue Jul 18, 2017 · 0 comments

Comments

@paulpogostick
Copy link

paulpogostick commented Jul 18, 2017

Hi. I have been searching for a library to use the git info in my programs and I this one is the best I've found :)
I created a wpf application, installed this library from Nuget, made some commits and print the git info like this:

#if DEBUG
	Version = ThisAssembly.Git.SemVer.Major + "." +
		ThisAssembly.Git.SemVer.Minor + "." +
		ThisAssembly.Git.Commits + "-" +
		ThisAssembly.Git.Branch + "+" +
		ThisAssembly.Git.Commit + ".Debug" +
		".commits_" +ThisAssembly.Git.Commits;
#else
	Version = ThisAssembly.Git.SemVer.Major + "." +
		ThisAssembly.Git.SemVer.Minor + "." +
		ThisAssembly.Git.Commits + "-" +
		ThisAssembly.Git.Branch + "+" +
		ThisAssembly.Git.Commit + ".Release" +
		".commits_" +ThisAssembly.Git.Commits;
#endif

It works perfectly, but when I keep making commits and even changing to new branches the ThisAssembly.Git.Commits remains as '0'. (If I make tags 'Tag' and 'BaseTag' change, but the commit counter remains as '0').

  • How can I make that counter (or the numbers of the BaseVersion or SemVer: Major , Minor and Patch) to increase automatically every time i make a new commit? (I read your documents but I didn't understand the customization part. I think it's related to adding a with a property in the .csproj of the project?. Can you please show me that with examples?).
  • Is the example above using the correct way to print if a program is compiled as Debug or Release using your library?

Thanks in advance,

@kzu kzu closed this as completed in 6c82467 Aug 7, 2017
@devlooped devlooped locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant