17 lines
1.0 KiB
XML
17 lines
1.0 KiB
XML
<Project>
|
|
<PropertyGroup Condition="Exists('$(MSBuildThisFileDirectory)version.json')">
|
|
<_YMhutVersionJson>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)version.json'))</_YMhutVersionJson>
|
|
<YMhutVersion>$([System.Text.RegularExpressions.Regex]::Replace('$(_YMhutVersionJson)', '(?s).*"version"\s*:\s*"([^"]+)".*', '$1'))</YMhutVersion>
|
|
<YMhutBuild>$([System.Text.RegularExpressions.Regex]::Replace('$(_YMhutVersionJson)', '(?s).*"build"\s*:\s*"?([0-9]+)"?.*', '$1'))</YMhutBuild>
|
|
<YMhutPackageVersion>$(YMhutVersion).$(YMhutBuild)</YMhutPackageVersion>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(YMhutVersion)' != '' and '$(YMhutBuild)' != ''">
|
|
<Version>$(YMhutVersion)</Version>
|
|
<PackageVersion>$(YMhutPackageVersion)</PackageVersion>
|
|
<AssemblyVersion>$(YMhutPackageVersion)</AssemblyVersion>
|
|
<FileVersion>$(YMhutPackageVersion)</FileVersion>
|
|
<InformationalVersion>$(YMhutPackageVersion)</InformationalVersion>
|
|
</PropertyGroup>
|
|
</Project>
|