build: Cleanup package version stamp code

This commit is contained in:
Andreia Gaita 2020-09-16 15:09:20 +02:00
Родитель b5f5863ba7
Коммит 716e6b947f
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -14,5 +14,6 @@
<PackageSubFolder>\$(CurrentFullPath.Substring($(PackageSourceRootFull.Length)))\</PackageSubFolder>
<NpmVersionSuffix>-preview</NpmVersionSuffix>
<CINeedsCustomVersion Condition=" '$(YAMATO_JOB_ID)' != '' ">true</CINeedsCustomVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -57,7 +57,7 @@
<PropertyGroup>
<NeedsSuffix Condition="'$(PublicRelease)' != 'true' and '$(NpmVersionSuffix)' != '' and !$(NuGetPackageVersion.Contains('$(NpmVersionSuffix)'))">true</NeedsSuffix>
<NeedsCustomVersion Condition="'$(PublicRelease)' != 'true' and '$(YAMATO_JOB_ID)' != ''">true</NeedsCustomVersion>
<NeedsCustomVersion Condition="'$(PublicRelease)' != 'true' and '$(CINeedsCustomVersion)' == 'true' ">true</NeedsCustomVersion>
<NpmVersion Condition=" '$(NeedsCustomVersion)' == 'true' ">$(BuildVersionSimple)$(NpmVersionSuffix)$(FileVersion.Substring($(FileVersion.LastIndexOf('.'))))</NpmVersion>
<NpmVersion Condition=" '$(NeedsCustomVersion)' != 'true' and '$(NeedsSuffix)' != 'true' ">$(NuGetPackageVersion)</NpmVersion>
<NpmVersion Condition=" '$(NeedsCustomVersion)' != 'true' and '$(NeedsSuffix)' == 'true' ">$(BuildVersionSimple)$(NpmVersionSuffix)-g$(GitCommitIdShort)</NpmVersion>
@ -164,7 +164,7 @@
<PropertyGroup>
<NeedsSuffix Condition="'$(PublicRelease)' != 'true' and '$(NpmVersionSuffix)' != '' and !$(NuGetPackageVersion.Contains('$(NpmVersionSuffix)'))">true</NeedsSuffix>
<NeedsCustomVersion Condition="'$(PublicRelease)' != 'true' and '$(YAMATO_JOB_ID)' != ''">true</NeedsCustomVersion>
<NeedsCustomVersion Condition="'$(PublicRelease)' != 'true' and '$(CINeedsCustomVersion)' == 'true' ">true</NeedsCustomVersion>
<NpmVersion Condition=" '$(NeedsCustomVersion)' == 'true' ">$(BuildVersionSimple)$(NpmVersionSuffix)$(FileVersion.Substring($(FileVersion.LastIndexOf('.'))))</NpmVersion>
<NpmVersion Condition=" '$(NeedsCustomVersion)' != 'true' and '$(NeedsSuffix)' != 'true' ">$(NuGetPackageVersion)</NpmVersion>
<NpmVersion Condition=" '$(NeedsCustomVersion)' != 'true' and '$(NeedsSuffix)' == 'true' ">$(BuildVersionSimple)$(NpmVersionSuffix)-g$(GitCommitIdShort)</NpmVersion>