Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions build/helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@ static ProjectCollection GetProjects(ConvertableFilePath slnPath, string configu
var solution = ParseSolution(slnPath);
var projects = solution.Projects.Where(p => p.Type != "{2150E333-8FDC-42A3-9474-1A3956D46DE8}");
var testAssemblies = projects.Where(p => p.Name.Contains(".Tests")).Select(p => p.Path.GetDirectory() + "/bin/" + configuration + "/" + p.Name + ".dll");
return new ProjectCollection {
SolutionPath = slnPath,
SourceProjects = projects.Where(p => !p.Name.Contains(".Tests")),
TestProjects = projects.Where(p => p.Name.Contains(".Tests"))
};
return new ProjectCollection(
SolutionPath: slnPath,
SourceProjects: projects.Where(p => !p.Name.Contains(".Tests")),
TestProjects: projects.Where(p => p.Name.Contains(".Tests"))
);

}
}

public class ProjectCollection {
public ConvertableFilePath SolutionPath { get; set;}
public IEnumerable<SolutionProject> SourceProjects { get; set;}
public IEnumerable<DirectoryPath> SourceProjectPaths {get { return SourceProjects.Select(p => p.Path.GetDirectory()); } }
public IEnumerable<SolutionProject> TestProjects {get;set;}
public IEnumerable<DirectoryPath> TestProjectPaths { get { return TestProjects.Select(p => p.Path.GetDirectory()); } }
public IEnumerable<SolutionProject> AllProjects { get { return SourceProjects.Concat(TestProjects); } }
public IEnumerable<DirectoryPath> AllProjectPaths { get { return AllProjects.Select(p => p.Path.GetDirectory()); } }
public record ProjectCollection(
ConvertableFilePath SolutionPath,
IEnumerable<SolutionProject> SourceProjects,
IEnumerable<SolutionProject> TestProjects)
{
public ICollection<DirectoryPath> SourceProjectPaths => field ??= [.. SourceProjects.Select(p => p.Path.GetDirectory())];
public ICollection<DirectoryPath> TestProjectPaths => field ??= [.. TestProjects.Select(p => p.Path.GetDirectory())];
public ICollection<SolutionProject> AllProjects => field ??= [.. SourceProjects.Concat(TestProjects)];
public ICollection<DirectoryPath> AllProjectPaths => field ??= [.. AllProjects.Select(p => p.Path.GetDirectory())];
}
2 changes: 1 addition & 1 deletion build/version.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public static partial class Program
{
private static string? fallbackVersion = Argument<string?>("force-version", EnvironmentVariable("FALLBACK_VERSION") ?? "0.1.0");
private static string fallbackVersion = Argument<string?>("force-version", EnvironmentVariable("FALLBACK_VERSION") ?? "0.1.0");

static string BuildVersion(string fallbackVersion) {
var PackageVersion = string.Empty;
Expand Down
2 changes: 1 addition & 1 deletion samples/Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.11" Condition="'$(TargetFramework)' == 'net9.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.1" Condition="'$(TargetFramework)' == 'net10.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.12" Condition="'$(TargetFramework)' == 'net9.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" Condition="'$(TargetFramework)' == 'net10.0'" />
<PackageReference Include="Spectre.Console.Cli" Version="0.53.1" />
</ItemGroup>

Expand Down