GitVersion: Cache broken with GitVersionTask 3.6.0
I’ve just updated the MSBuild task package and apparently the cache is broken. Each target (WriteVersionInfoToBuildLog, WriteVersionInfoToBuildLog and GitVersion) in each built project recalculates the version number from scratch. Every time I see
Cache file C:\TeamCity\buildAgent\work\aaa244402599d927\.git\gitversion_cache\XYZ123.yml not found
And every time (during one build) the XYZ123 part is different. Worked good in version 3.5.4
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 31 (25 by maintainers)
Commits related to this issue
- Downgrade gitversion because cache is not working in 3.6.0 see https://github.com/GitTools/GitVersion/issues/942 — committed to miracle-as/kitos by Martin-Andersen 8 years ago
- Added test for dynamic repositories Removed redundant call to gitPreparer.Initialise since it's now called earlier — committed to GitTools/GitVersion by rubenmamo 8 years ago
Updated to 3.6.2. Cache is working again on my build server. Thanks!
@JakeGinnivan I made a local build of GitVersion, where I added a bunch of debug info:
The difference is when getting the last directory write. If you look at the timestamps, the write to
.git\refs\headshappens somewhere betweenBranch from build environment: refs/heads/masterandIsDynamicGitRepository: False