Skip to content

Commit

Permalink
Merge branch 'releases/2.2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
blipson89 committed Jun 15, 2024
2 parents 426f343 + c97d633 commit f6f0dbc
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
THE MIT LICENSE

Copyright (c) 2023 Ben Lipson
Copyright (c) 2024 Ben Lipson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
17 changes: 16 additions & 1 deletion src/Leprechaun.Cli/Leprechaun.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<PackAsTool>true</PackAsTool>
<ToolCommandName>leprechaun</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
Expand Down Expand Up @@ -40,5 +40,20 @@
<PackagePath>tools\net6.0\any\Legacy</PackagePath>
<Visible>false</Visible>
</None>
<None Include="..\Leprechaun.InputProviders.Sitecore\bin\Release\net8.0\*">
<Pack>true</Pack>
<PackagePath>tools\net8.0\any\Plugins</PackagePath>
<Visible>false</Visible>
</None>
<None Include="..\Leprechaun.Console\bin\Release\net472\*">
<Pack>true</Pack>
<PackagePath>tools\net8.0\any\Legacy</PackagePath>
<Visible>false</Visible>
</None>
<None Include="..\Leprechaun.InputProviders.Rainbow\bin\Release\net472\*Rainbow*.*">
<Pack>true</Pack>
<PackagePath>tools\net8.0\any\Legacy</PackagePath>
<Visible>false</Visible>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<RootNamespace>Leprechaun.CodeGen.Roslyn</RootNamespace>
<AssemblyName>Leprechaun.CodeGen.Roslyn</AssemblyName>
<TargetFrameworks>net472;net6.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0;netstandard2.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<RootNamespace>Leprechaun.InputProviders.Sitecore</RootNamespace>
<AssemblyName>Leprechaun.InputProviders.Sitecore</AssemblyName>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
Expand Down Expand Up @@ -47,7 +47,7 @@
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NJsonSchema" Version="10.0.21" />
<PackageReference Include="Sitecore.DevEx.Configuration" Version="4.0.0" />
<PackageReference Include="Sitecore.DevEx.Serialization" Version="4.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public override TemplateInfo[] GetTemplates(ITemplatePredicate predicate)
public async Task<IEnumerable<TemplateInfo>> GetTemplates(SitecoreTemplatePredicate predicate)
{
var module = predicate.GetModule();
if(module == null)
{
throw new InvalidConfigurationException($"No Sitecore module was found for the predicate '{predicate.GetConfigName()}'");
}
await module.DataStore.Reinitialize(null); // ensure the datastore is up to date
var tasks = new List<Task<IEnumerable<TemplateInfo>>>();
foreach (var fstree in predicate.GetTreeSpecs())
Expand Down
2 changes: 1 addition & 1 deletion src/Leprechaun.Tests/Leprechaun.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>Leprechaun.Tests</RootNamespace>
<AssemblyName>Leprechaun.Tests</AssemblyName>
Expand Down
2 changes: 2 additions & 0 deletions src/Leprechaun/Filters/BaseTemplatePredicate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ protected IList<ITemplateTreeRoot> ParsePreset(XmlNode configuration)
return presets;
}

public string GetConfigName() => _configuration.Name;

public virtual bool Includes(TemplateInfo template)
{
Assert.ArgumentNotNull(template, nameof(template));
Expand Down
4 changes: 2 additions & 2 deletions src/Leprechaun/Leprechaun.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<RootNamespace>Leprechaun</RootNamespace>
<AssemblyName>Leprechaun</AssemblyName>
<TargetFrameworks>net472;net6.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net472;net6.0;net8.0;netstandard2.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup>
Expand Down Expand Up @@ -36,6 +36,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Configy" Version="1.1.0-pre02" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/SharedProperties.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
<RepositoryUrl>https://github.com/blipson89/Leprechaun</RepositoryUrl>
<PackageIconUrl>http://www.benlipson.net/wp-content/uploads/2018/04/leprechaun-logo_pipe-small.png</PackageIconUrl>
<Copyright2023 Ben Lipson</Copyright>
<Copyright2024 Ben Lipson</Copyright>
</PropertyGroup>
</Project>

0 comments on commit f6f0dbc

Please sign in to comment.