-
Notifications
You must be signed in to change notification settings - Fork 654
How to get BUILD_NUMBER into version? #2396
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
Comments
It's not possible to change the value of What can be discussed, though, is whether the version number exposed to TeamCity needs to be GitVersion/src/GitVersionCore/BuildAgents/TeamCity.cs Lines 56 to 59 in f6bc10b
I don't think it does, but it's not clear how a change here should be made possible. It would probably have to involve some sort of configuration, which I'm hesitant to add. Would it be possible to perhaps just write your own version number to the log? I have hope that the last line writing |
I don't know why, but when I looked for the teamcity integration last night I couldn't see it... I don't know if you're interested in merging it in: |
Perhaps your use case is more along the lines of what's being discussed in #2065? |
Thanks, but no not really. I ended up abandoning GitVersion since even after I solved the formats that I wanted, I couldn't see a way to make version number incrementing work like I expected and ran out of time for testing/experimenting. For some reason commits on 'master' and commits on 'develop', despite not merging kept bumping each other's major version numbers. Anyway, I'll close the issue. |
Uh oh!
There was an error while loading. Please reload this page.
I'm using GitVersion 5.3.7 from
gitversion-ubuntu.18.04-x64-5.3.7.tar.gz
to try and generate version numbers for my application.I'm using TeamCity as a build server.
I'd like to ensure that the version numbers are unique for every build, as there's scenarios where once a version number has been used, it can't be used on a subsequent build. This covers all the version numbers, both semver, as well as assembly, nuget, and the one put back into TeamCity.
TeamCity agent is populating
BUILD_NUMBER
just fine, and I've managed to get some of the version numbers to includeBUILD_NUMBER
, but other parts insist on using CommitsSinceVersionSource.Is there a way for me to override this value, or otherwise achieve what I'm trying to do?
As you can see, these three are working fine:
But these are not:
Either SemVer or FullSemVer is being used in teamcity.
If I could provide a format string for these, like I can for others - then that'd solve my issue.
At the moment it looks like my only solution is to compile a version of the app hacking
src/GitVersionCore/VersionCalculation/VariableProvider.cs
to do what I want.Configuration:
The text was updated successfully, but these errors were encountered: