Skip to content

Conditional ms build tasks #687

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

Merged
merged 4 commits into from
Nov 22, 2015

Conversation

pi3k14
Copy link

@pi3k14 pi3k14 commented Oct 12, 2015

Did a retake on this pull request - allows the user to conditionally disable GitVersions MSBuild tasks

Default behavior is to run all task (as before)

<UpdateAssemblyInfo
SolutionDirectory="$(SolutionDir)"
NoFetch="$(GitVersion_NoFetchEnabled)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you removed NoFetch intentionally? This was introduced to fix #646

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - it's a diff I didn't catch when creating a patch from my "messy" repo.

@pi3k14
Copy link
Author

pi3k14 commented Oct 13, 2015

Added NoFetch back (and if someone wonder, I am not going to touch git -rebase to make this any "prettier" ;)

@pascalberger
Copy link
Member

LGTM. The only thing I'm not sure is, that with now three individual targets, all dependent on the same target, is it ensured that they are always called in the correct order?

@pi3k14
Copy link
Author

pi3k14 commented Oct 15, 2015

I didn't think there was a dependency between this targets, if so this PR breaks up. The intention was to switch of the tasks you didn't want (UpdateAssemblyInfo in my case, because I want to handle AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion individually, and so far I haven't had any problems with it).

This solution only assure that the tasks are run before CoreCompile, in no particular order.

If there is a dependency between them, I can't switch them off at will. Do you have any further information about this?

@pascalberger
Copy link
Member

@JakeGinnivan Do you know if the execution order is an issue here?

@JakeGinnivan
Copy link
Contributor

Not sure.. @SimonCropp ?

…fault values of SolutionDir and IntermediateOutputPatch)
@pi3k14
Copy link
Author

pi3k14 commented Oct 23, 2015

The original order was; WriteVersionInfoToBuildLog, UpdateAssemblyInfo and GetVersion.

WriteVersionInfoToBuildLog cant be dependent on any of the other task.
I have run a great deal of builds with only GetVersion, and it works without any problems (also tested on new 1.89 build agent on TFS, RC1 version).

The remaining questions then are - is UpdateAssemblyInfo dependent on WriteVersionInfoToBuild Log, would running WriteVersionInfoToBuildLog after the other tasks create havoc?
To me, that would make no sense.

@JakeGinnivan
Copy link
Contributor

This is an area of GitVersion I don't know very well so it all looks fine to me. @pascalberger if you can't see anything, lets merge

pascalberger added a commit that referenced this pull request Nov 22, 2015
@pascalberger pascalberger merged commit 3d421be into GitTools:master Nov 22, 2015
@pi3k14 pi3k14 deleted the ConditionalMSBuildTasks branch November 23, 2015 06:23
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.

3 participants