Ship two json schema files.. One that reference others, and a CMS one (#13123)
* Ship two json schema files.. One that reference others, and a CMS one * git ignore * Build schema files sepearately
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.*.json">
|
||||
<DependentUpon>appsettings.json</DependentUpon>
|
||||
</Content>
|
||||
<Content Update="appsettings-schema.*.json">
|
||||
<DependentUpon>appsettings-schema.json</DependentUpon>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Razor files are needed for the backoffice to work correctly -->
|
||||
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
|
||||
@@ -37,4 +46,25 @@
|
||||
<Message Text="Copying appsettings.Development.template.json to appsettings.Development.json because it doesn't exist" Importance="high" />
|
||||
<Copy SourceFiles="appsettings.Development.template.json" DestinationFiles="appsettings.Development.json" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<JsonSchemaPath>$(ProjectDir)appsettings-schema.json</JsonSchemaPath>
|
||||
<JsonSchemaCmsPath>$(ProjectDir)appsettings-schema.umbraco.json</JsonSchemaCmsPath>
|
||||
<JsonSchemaProjectPath>$(ProjectDir)../JsonSchema/</JsonSchemaProjectPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CheckPreconditions" BeforeTargets="Build">
|
||||
<Message Text="-CheckPreconditions-" Importance="high" />
|
||||
<Message Text="JsonSchemaPath: $(JsonSchemaPath)" Importance="high" />
|
||||
<Message Text="JsonSchemaCmsPath: $(JsonSchemaCmsPath)" Importance="high" />
|
||||
<CallTarget Targets="JsonSchemaBuild" Condition="!(Exists('$(JsonSchemaPath)') AND Exists('$(JsonSchemaCmsPath)')) and '$(UmbracoBuild)' == ''" />
|
||||
<CallTarget Targets="AppsettingsBuild" Condition="!Exists('appsettings.json')" />
|
||||
<CallTarget Targets="AppsettingsDevBuild" Condition="!Exists('appsettings.Development.json')" />
|
||||
</Target>
|
||||
|
||||
|
||||
|
||||
<Target Name="JsonSchemaBuild">
|
||||
<Exec Command="dotnet run -c Release --project $(JsonSchemaProjectPath) --mainOutputFile "$(ProjectDir)appsettings-schema.json" --cmsOutputFile "$(ProjectDir)appsettings-schema.umbraco.json"" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user