|
105 | 105 | <Touch Files="$(_OutputPath)PackagePaths.props" /> |
106 | 106 | </Target> |
107 | 107 |
|
| 108 | + <Target Name="_CreateVersionProps" |
| 109 | + AfterTargets="Build" |
| 110 | + DependsOnTargets="GitVersion" |
| 111 | + Inputs="$(MSBuildThisFileFullPath);$(MSBuildThisFileDirectory)Java.Interop.BootstrapTasks.csproj" |
| 112 | + Outputs="$(_OutputPath)Versions.props"> |
| 113 | + <PropertyGroup> |
| 114 | + <_NetToolVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)</_NetToolVersion> |
| 115 | + <_OldToolVersion>0.2.$(GitBaseVersionPatch).$(GitCommits)</_OldToolVersion> |
| 116 | + <_NetCoreLibVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0</_NetCoreLibVersion> |
| 117 | + <_OldCoreLibVersion>0.1.0.0</_OldCoreLibVersion> |
| 118 | + <_FileVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)</_FileVersion> |
| 119 | + </PropertyGroup> |
| 120 | + <ItemGroup> |
| 121 | + <_VersionsLine Include="<Project>" /> |
| 122 | + <_VersionsLine Include=" <PropertyGroup>" /> |
| 123 | + <_VersionsLine Include=" <FileVersion>$(_FileVersion)</FileVersion>" /> |
| 124 | + <_VersionsLine Include=" <JINetToolVersion>$(_NetToolVersion)</JINetToolVersion>" /> |
| 125 | + <_VersionsLine Include=" <JIOldToolVersion>$(_OldToolVersion)</JIOldToolVersion>" /> |
| 126 | + <_VersionsLine Include=" <JINetCoreLibVersion>$(_NetCoreLibVersion)</JINetCoreLibVersion>" /> |
| 127 | + <_VersionsLine Include=" <JIOldCoreLibVersion>$(_OldCoreLibVersion)</JIOldCoreLibVersion>" /> |
| 128 | + <_VersionsLine Include=" <JIBuildBranch>$(GitBranch)</JIBuildBranch>" /> |
| 129 | + <_VersionsLine Include=" <JIBuildCommit>$(GitCommit)</JIBuildCommit>" /> |
| 130 | + <_VersionsLine Include=" </PropertyGroup>" /> |
| 131 | + <_VersionsLine Include="</Project>" /> |
| 132 | + </ItemGroup> |
| 133 | + <WriteLinesToFile |
| 134 | + File="$(_OutputPath)Version.props" |
| 135 | + Lines="@(_VersionsLine)" |
| 136 | + Overwrite="True" |
| 137 | + /> |
| 138 | + <Touch Files="$(_OutputPath)Version.props" /> |
| 139 | + </Target> |
| 140 | + |
108 | 141 | </Project> |
0 commit comments