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

Added a new command line argument -assemblyVersionFormat #315

Merged
merged 1 commit into from Nov 29, 2014
Merged

Added a new command line argument -assemblyVersionFormat #315

merged 1 commit into from Nov 29, 2014

Conversation

dazinator
Copy link
Member

Added a new command line argument -assemblyVersionFormat that can be used to specify which GitVersion variable is used when setting the AssemblyVersion attribute.

@JakeGinnivan
Copy link
Contributor

This is supported via config now. Do you think it is worth having both config and command line option?

@gep13
Copy link
Member

gep13 commented Nov 21, 2014

I would have thought consistency, in terms of task, exe and gem, via the config file would be the best approach.

@dazinator
Copy link
Member Author

Does that mean, I would need to adjust a config file, and then run the command line exe, and it will honour the setting from the config file? Seems like a bit of a hassle for someone who just wants to plug the command line tool into a team city build step - i.e the need to add another step first to set the config file appropriately..

@gep13
Copy link
Member

gep13 commented Nov 21, 2014

In a TeamCity build configuration the config file would be another artefact of the build, checked directly into source control. That way you would have full history of changes that have been made to it. I don't see that being a problem.

Sent from my Windows Phone


From: Darrellmailto:notifications@github.com
Sent: ‎21/‎11/‎2014 16:25
To: ParticularLabs/GitVersionmailto:GitVersion@noreply.github.com
Cc: Gary Ewan Parkmailto:gep13@gep13.co.uk
Subject: Re: [GitVersion] #314 (#315)

Does that mean, I would need to adjust a config file, and then run the command line exe, and it will honour the setting from the config file? Seems like a bit of a hassle for someone who just wants to plug the command line tool into a team city build step - i.e the need to add another step first to set the config file appropriately..


Reply to this email directly or view it on GitHub:
#315 (comment)

@dazinator
Copy link
Member Author

Hi @gep13 - perhaps I am not understanding so go easy on me haha

The problem I see with that approach is how it would work in a scenario where you have multiple build configurations (of the same repo) in team city, and you want to use different config per build configuration. For example, perhaps for my CI build I want to stamp my assemblies with different info / version number formats than I use for my "Release" build.

Perhaps if you made it so that you can pass an argument to the command line tool to tell it which config file to use? That would then allow you to have multiple config files in your repo - 1 for each build configuration that you need, and then set up Team City like so:

Build 1 = GitVersion.exe -configfile "src\build1\path to config.json"
Build 2= GitVersion.exe -configfile "src\build2\path to config2.json"

Do you think my concern is valid or am i overthinking it?

(I should also say that all this stuff is very new to me!)

@JakeGinnivan
Copy link
Contributor

I am happy to pull this in, I just was questioning if we needed it. Sounds like it has valid use cases.

@dazinator can you rebase?

@dazinator
Copy link
Member Author

Sure, i will attempt a git rebase - not done that before so will need to read up a bit first.

Added a new command line argument -assemblyVersionFormat that can be used to specify which GitVersion variable is used when setting the AssemblyVersion attribute.
@dazinator
Copy link
Member Author

Ok, so rebased and resolved a merge conflict using git bash on windows. I'm learning some serious sit skills via this PR haha.

@gep13
Copy link
Member

gep13 commented Nov 23, 2014

The problem I see with that approach is how it would work in a scenario where you have multiple build configurations (of the same repo) in team city, and you want to use different config per build configuration. For example, perhaps for my CI build I want to stamp my assemblies with different info / version number formats than I use for my "Release" build.

Interesting, I hadn't thought of that. I don't personally do this, but I think I can see why you would require. This, as such, we would need either the ability that you suggested, or allow a per branch configuration to be defined in the yaml file.

If this is something that we think is required for a future version, I would suggest opening a new issue so that we can track it.

Ok, so rebased and resolved a merge conflict using git bash on windows. I'm learning some serious sit skills via this PR haha.

Rebase, FTW! (Although, can be very dangerous, so take care 😄)

@JakeGinnivan
Copy link
Contributor

@SimonCropp @andreasohlund you guys happy for this to come in.

I think it is all good.

@andreasohlund
Copy link
Contributor

Looks good!

JakeGinnivan added a commit that referenced this pull request Nov 29, 2014
@JakeGinnivan JakeGinnivan merged commit 4a6dccd into GitTools:master Nov 29, 2014
@dazinator dazinator deleted the dev branch November 29, 2014 15:46
@gep13 gep13 added this to the 2.0.0 milestone Dec 9, 2014
@SimonCropp SimonCropp changed the title #314 Added a new command line argument -assemblyVersionFormat Dec 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants