-
Notifications
You must be signed in to change notification settings - Fork 654
How Can I include the TeamCity build number in the metadata #1358
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
I've had some success by adding the TC build number to the env.Git_Branch TC parameter:
Seems to work, the build number is visible as .B123. Will doing this break something else? Will 'Git_Branch' work as expected? |
Hi, yes it is quite a hack and it does not work properly. I forget why. As for be a duplicate - that depends on the solution. #1157 is for TFS so I cannot say a solution for TFS would be usable with TeamCity. Using environment variables (#648) may well be workable with TeamCity as I think I can get it push out the build number to an environment variable. If youre going to implement environment variables, then I think I can use that solution and this can be closed as a duplicate. Rob |
After thinking about this for a while and reading all the requirements and ideas for solution, I think environment variables is the way to go. We don't have anything near an implementation yet, though. Are you up for the challenge? |
If what I describe in #1157 (comment) sounds like a fitting solution to this problem, I propose that we close this as a duplicate of #1157. |
Maybe LOL. I'll see how i go. |
Excellent! Just shout out if you need any assistance! |
Please try/comment the PR #1385. It allows you to use environment variables in format strings. I think this would solve your issue. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I want to include the TeamCity build number in the SemVer (AssemblyInformationVersion) metadata. How can I do this?
I want the build server's build number so that releases can be traced back to a particular build in an environment were builds of the same
<major>.<minor>.<patch>
version number could (in theory) be built multiple times. We need traceability to the build logs.I'm hoping somebody has already done this. I know that TeamCity sets an environment variable with this number so it is both possible to detect if the build is running from a TeamCity server and what the build number is.
The text was updated successfully, but these errors were encountered: