Implement IsPublish property

This commit is contained in:
LotP1 2024-12-18 22:37:43 +01:00
parent 9fab643ab3
commit be9fc6774a

View file

@ -4,6 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IsPublish Condition="'$(IsPublish)' == ''">False</IsPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -11,10 +12,17 @@
<PackageReference Include="Newtonsoft.Json" /> <PackageReference Include="Newtonsoft.Json" />
</ItemGroup> </ItemGroup>
<Target Name="SetIsPublish" BeforeTargets="BeforePublish">
<PropertyGroup>
<IsPublish Condition="'$(IsPublish)' != ''">True</IsPublish>
</PropertyGroup>
</Target>
<UsingTask TaskName="Ryujinx.BuildValidationTasks.LocaleValidationTask" TaskFactory="TaskHostFactory" AssemblyFile="$(OutDir)Ryujinx.BuildValidationTasks.dll" /> <UsingTask TaskName="Ryujinx.BuildValidationTasks.LocaleValidationTask" TaskFactory="TaskHostFactory" AssemblyFile="$(OutDir)Ryujinx.BuildValidationTasks.dll" />
<Target Name="LocalesJsonValidation" AfterTargets="AfterBuild"> <Target Name="LocalesJsonValidation" AfterTargets="AfterBuild">
<LocaleValidationTask /> <Message Text="IsPublish: $(IsPublish)" Importance="high"/>
<LocaleValidationTask Condition="'$(IsPublish)' != 'True'"/>
</Target> </Target>
</Project> </Project>