|
74 | 74 |
|
75 | 75 | <Target Name="ComputeVersion" BeforeTargets="GenerateNuspec"> |
76 | 76 | <PropertyGroup> |
77 | | - <_GitTmpFile>$(IntermediateOutputPath)git-info.txt</_GitTmpFile> |
| 77 | + <_GitTmpFile>$([System.String]::Copy('$(IntermediateOutputPath)git-info.txt').Replace('\', '/'))</_GitTmpFile> |
78 | 78 | <Timestamp>$([System.DateTime]::UtcNow.ToString("yyyyMMddHHmmss"))</Timestamp> |
79 | 79 | </PropertyGroup> |
80 | 80 |
|
|
85 | 85 | </ReadLinesFromFile> |
86 | 86 |
|
87 | 87 | <!-- 2. Get exact tag at HEAD (may be blank) --> |
88 | | - <Exec Command="(git describe --exact-match --tags HEAD || echo) > "$(_GitTmpFile)"" /> |
| 88 | + <Exec Command="(git describe --exact-match --tags HEAD || exit 0) > "$(_GitTmpFile)"" /> |
89 | 89 | <ReadLinesFromFile File="$(_GitTmpFile)"> |
90 | 90 | <Output TaskParameter="Lines" PropertyName="ExactTag"/> |
91 | 91 | </ReadLinesFromFile> |
|
97 | 97 | </ReadLinesFromFile> |
98 | 98 |
|
99 | 99 | <!-- 4. Is working tree dirty? --> |
100 | | - <Exec Command="(git diff --quiet HEAD && echo no || echo yes) > "$(_GitTmpFile)"" /> |
| 100 | + <Exec Command="(git diff --quiet HEAD && echo no || exit 0) > "$(_GitTmpFile)"" /> |
101 | 101 | <ReadLinesFromFile File="$(_GitTmpFile)"> |
102 | 102 | <Output TaskParameter="Lines" PropertyName="IsDirty"/> |
103 | 103 | </ReadLinesFromFile> |
104 | 104 |
|
105 | 105 | <!-- 5. Is master a descendant of HEAD? --> |
106 | | - <Exec Command="(git merge-base --is-ancestor HEAD master && echo yes || echo no) > "$(_GitTmpFile)"" /> |
| 106 | + <Exec Command="(git merge-base --is-ancestor HEAD master && echo yes || exit 0) > "$(_GitTmpFile)"" /> |
107 | 107 | <ReadLinesFromFile File="$(_GitTmpFile)"> |
108 | 108 | <Output TaskParameter="Lines" PropertyName="MasterDescendant"/> |
109 | 109 | </ReadLinesFromFile> |
|
138 | 138 | <Message Importance="High" Text="MasterDescendant : $(MasterDescendant)" /> |
139 | 139 | <Message Importance="High" Text="BaseVersion : $(BaseVersion)" /> |
140 | 140 | <Message Importance="High" Text="_ResolvedVersion : $(_ResolvedVersion)" /> |
141 | | - <Message Importance="High" Text="Final Version : $(Version)" /> |
| 141 | + <Message Importance="High" Text="Final Version : $(PackageVersion)" /> |
142 | 142 | <Message Importance="High" Text="----------------------------------" /> |
143 | 143 |
|
144 | 144 | </Target> |
|
0 commit comments