Skip to content

Commit

Permalink
v11 build/infra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwoulfe committed Jan 9, 2023
1 parent 6c7e02e commit eb9eafb
Show file tree
Hide file tree
Showing 14 changed files with 2,234 additions and 528 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Authors>Nathan Woulfe</Authors>
<Copyright>Copyright © Nathan Woulfe $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
<PackageIcon>icon.png</PackageIcon>
Expand Down
6 changes: 3 additions & 3 deletions Preflight.Site/Preflight.Site.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Content Remove="C:\Users\natha\source\repos\Preflight-10\icon.png" />
<Content Remove="C:\Users\natha\source\repos\Preflight-11\icon.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="clean" Version="2.1.6" />
<PackageReference Include="Umbraco.Cms" Version="10.3.2" />
<PackageReference Include="Umbraco.Cms" Version="[11.0.0, 12)" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions Preflight.Site/Views/BlockGridContent.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.BlockGridContent>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
Layout = null;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@using Umbraco.Extensions
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>

<h2 style="padding: 20px">@Model.Content.Value("headline")</h2>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@using Umbraco.Extensions
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>

@{
var typedMediaPickerSingle = Model.Content.Value<Umbraco.Cms.Core.Models.MediaWithCrops>("image");
if (typedMediaPickerSingle != null)
{
<img src="@typedMediaPickerSingle.MediaUrl()" style="object-fit:cover; width:100%; height:100%;"/>
} else {
<p>Missing image</p>
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@using Umbraco.Extensions
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>

<div style="padding: 20px">
@Model.Content.Value("richText")
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@using Umbraco.Extensions
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Core.Models.Blocks.BlockGridItem>

<div>
@await Html.GetBlockGridItemAreasHtmlAsync(Model)
</div>
1,810 changes: 1,810 additions & 0 deletions Preflight.Site/appsettings-schema.Umbraco.Cms.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.402",
"version": "7.0.100",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion src/Preflight/Backoffice/gulp/config.outputPath.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const outputPath = '../obj/Debug/net6.0/clientassets'
export const outputPath = '../obj/Debug/net7.0/clientassets'
4 changes: 2 additions & 2 deletions src/Preflight/Preflight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<ItemGroup>
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[10.0.0, 11)" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[10.0.0, 11)" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[11.0.0, 12)" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[11.0.0, 12)" />
</ItemGroup>

<Import Project="build\Microsoft.AspNetCore.ClientAssets.targets" />
Expand Down
4 changes: 2 additions & 2 deletions src/Preflight/build/Microsoft.AspNetCore.ClientAssets.targets
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<FileWrites Include="@(_ClientAssetsBuildOutput)" />
<FileWrites Include="$(IntermediateOutputPath)clientassetsbuild.complete.txt" />

<Content Condition="'$(TargetFramework)' != 'net6.0'" Include="@(_ClientAssetsBuildOutput)" Link="wwwroot\%(_ClientAssetsBuildOutput.RecursiveDir)\%(_ClientAssetsBuildOutput.FileName)%(_ClientAssetsBuildOutput.Extension)" />
<Content Condition="'$(TargetFramework)' != 'net7.0'" Include="@(_ClientAssetsBuildOutput)" Link="wwwroot\%(_ClientAssetsBuildOutput.RecursiveDir)\%(_ClientAssetsBuildOutput.FileName)%(_ClientAssetsBuildOutput.Extension)" />
</ItemGroup>

<!--
Expand All @@ -62,7 +62,7 @@
release we will address this by aligning DiscoverStaticWebAssets behavior with DefineStaticWebAssets to follow the same heuristics for determining the content root.
-->

<DefineStaticWebAssets Condition="'$(TargetFramework)' == 'net6.0'" CandidateAssets="@(_ClientAssetsBuildOutput)" SourceId="$(PackageId)" SourceType="Computed" ContentRoot="$(_ClientAssetsOutputFullPath)" BasePath="$(StaticWebAssetBasePath)">
<DefineStaticWebAssets Condition="'$(TargetFramework)' == 'net7.0'" CandidateAssets="@(_ClientAssetsBuildOutput)" SourceId="$(PackageId)" SourceType="Computed" ContentRoot="$(_ClientAssetsOutputFullPath)" BasePath="$(StaticWebAssetBasePath)">
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
</DefineStaticWebAssets>
</Target>
Expand Down
Loading

0 comments on commit eb9eafb

Please sign in to comment.