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

Add nocache property to msbuild task #2684

Merged
merged 1 commit into from
May 11, 2021

Conversation

peterbomers
Copy link
Contributor

Description

Add GitVersion_NoCacheEnabled to support the nocache option for the msbuild task.

Related Issue

None

Motivation and Context

Our CI pipeline injects the build id for tracking purposes.
To do this, we configure GetVersion like this:

mode: Mainline
assembly-versioning-scheme: MajorMinorPatchTag
assembly-file-versioning-format: '{Major}.{Minor}.{Patch}.{env:BUILD_BUILDID ?? 0}'
assembly-versioning-format: '{Major}.{Minor}.{Patch}.{env:BUILD_BUILDID ?? 0}'

This works perfect for the first build on an agent.
If a commit is build twice on the same agent, the cache injects an old build id.
With this new option we can bypass the cache.

How Has This Been Tested?

It isn't. Couldn't find any related (unit)test involving the GitVersion_ToolArgments
Please review carefully.

Screenshots (if appropriate):

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@arturcic arturcic added this to the 5.6.10 milestone May 11, 2021
@arturcic arturcic merged commit 0f1acb3 into GitTools:main May 11, 2021
@mergify
Copy link
Contributor

mergify bot commented May 11, 2021

Thank you @peterbomers for your contribution!

@peterbomers peterbomers deleted the feature-msbuild-nocache branch May 11, 2021 12:13
@github-actions
Copy link

🎉 This issue has been resolved in version 5.6.10 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants