Skip to content

Commit

Permalink
Merge pull request #4520 from MahApps/deps
Browse files Browse the repository at this point in the history
Update cake and MahApps.Metro.IconPacks
  • Loading branch information
punker76 authored Oct 16, 2024
2 parents 721af24 + 9d9193f commit 62e5e7b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "3.1.0",
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
33 changes: 14 additions & 19 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#tool dotnet:?package=GitReleaseManager.Tool&version=0.15.0
#tool dotnet:?package=XamlStyler.Console&version=3.2404.2
#tool nuget:?package=GitVersion.CommandLine&version=5.12.0
#tool nuget:?package=NUnit.ConsoleRunner&version=3.18.3

#addin nuget:?package=Cake.Figlet&version=2.0.1

///////////////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -28,6 +25,8 @@ var solution = srcDir + "/MahApps.Metro.sln";
var publishDir = baseDir + "/Publish";
var testResultsDir = Directory(baseDir + "/TestResults");

var gitVersionPath = Context.Tools.Resolve("gitversion.exe");

var styler = Context.Tools.Resolve("xstyler.exe");
var stylerFile = baseDir + "/Settings.XAMLStyler";

Expand All @@ -38,8 +37,7 @@ public class BuildData
public DotNetVerbosity DotNetVerbosity { get; }
public bool IsLocalBuild { get; set; }
public bool IsPullRequest { get; set; }
public bool IsDevelopBranch { get; set; }
public bool IsReleaseBranch { get; set; }
public bool IsPrerelease { get; set; }
public GitVersion GitVersion { get; set; }

public BuildData(
Expand All @@ -56,9 +54,7 @@ public class BuildData
public void SetGitVersion(GitVersion gitVersion)
{
GitVersion = gitVersion;

IsDevelopBranch = StringComparer.OrdinalIgnoreCase.Equals("develop", GitVersion.BranchName);
IsReleaseBranch = StringComparer.OrdinalIgnoreCase.Equals("main", GitVersion.BranchName);
IsPrerelease = GitVersion.NuGetVersion.Contains("-");
}
}

Expand All @@ -73,11 +69,7 @@ Setup<BuildData>(ctx =>
throw new NotImplementedException($"{repoName} will only build on Windows because it's not possible to target WPF and Windows Forms from UNIX.");
}

Information(Figlet(repoName));

var gitVersionPath = Context.Tools.Resolve("gitversion.exe");

Information("GitVersion : {0}", gitVersionPath);
Spectre.Console.AnsiConsole.Write(new Spectre.Console.FigletText(repoName));

var buildData = new BuildData(
configuration: Argument("configuration", "Release"),
Expand All @@ -98,15 +90,18 @@ Setup<BuildData>(ctx =>
}
buildData.SetGitVersion(GitVersion(new GitVersionSettings { ToolPath = gitVersionPath, OutputType = GitVersionOutput.Json }));

Information("GitVersion : {0}", gitVersionPath);
Information("Branch : {0}", buildData.GitVersion.BranchName);
Information("Configuration : {0}", buildData.Configuration);
Information("IsLocalBuild : {0}", buildData.IsLocalBuild);
Information("IsPrerelease : {0}", buildData.IsPrerelease);
Information("Informational Version: {0}", buildData.GitVersion.InformationalVersion);
Information("SemVer Version: {0}", buildData.GitVersion.SemVer);
Information("AssemblySemVer Version: {0}", buildData.GitVersion.AssemblySemVer);
Information("MajorMinorPatch Version: {0}", buildData.GitVersion.MajorMinorPatch);
Information("NuGet Version: {0}", buildData.GitVersion.NuGetVersion);
Information("Verbosity : {0}", buildData.Verbosity);
Information("Publish folder : {0}", publishDir);

return buildData;
});
Expand All @@ -123,8 +118,7 @@ Task("Clean")
.ContinueOnError()
.Does(() =>
{
var filesToDelete = GetFiles("**/*_wpftmp.csproj")
;
var filesToDelete = GetFiles("**/*_wpftmp.csproj");
DeleteFiles(filesToDelete);

var directoriesToDelete = GetDirectories("./**/obj")
Expand All @@ -146,11 +140,11 @@ Task("Build")
var msbuildSettings = new DotNetMSBuildSettings
{
MaxCpuCount = 0,
Version = data.IsReleaseBranch ? data.GitVersion.MajorMinorPatch : data.GitVersion.NuGetVersion,
Version = data.GitVersion.NuGetVersion,
AssemblyVersion = data.GitVersion.AssemblySemVer,
FileVersion = data.GitVersion.AssemblySemFileVer,
InformationalVersion = data.GitVersion.InformationalVersion,
ContinuousIntegrationBuild = data.IsReleaseBranch,
ContinuousIntegrationBuild = true,
ArgumentCustomization = args => args.Append("/m").Append("/nr:false") // The /nr switch tells msbuild to quite once it's done
};
// msbuildSettings.FileLoggers.Add(
Expand Down Expand Up @@ -182,7 +176,7 @@ Task("Pack")
var msbuildSettings = new DotNetMSBuildSettings
{
MaxCpuCount = 0,
Version = data.IsReleaseBranch ? data.GitVersion.MajorMinorPatch : data.GitVersion.NuGetVersion,
Version = data.GitVersion.NuGetVersion,
AssemblyVersion = data.GitVersion.AssemblySemVer,
FileVersion = data.GitVersion.AssemblySemFileVer,
InformationalVersion = data.GitVersion.InformationalVersion
Expand Down Expand Up @@ -306,6 +300,7 @@ Task("Tests")
Configuration = data.Configuration,
NoBuild = true,
NoRestore = true,
Loggers = new[] { "trx" },
ResultsDirectory = testResultsDir,
Verbosity = data.DotNetVerbosity
};
Expand Down Expand Up @@ -338,7 +333,7 @@ Task("CreateRelease")
GitReleaseManagerCreate(token, "MahApps", repoName, new GitReleaseManagerCreateSettings {
Milestone = data.GitVersion.MajorMinorPatch,
Name = data.GitVersion.AssemblySemFileVer,
Prerelease = data.IsDevelopBranch,
Prerelease = data.IsPrerelease,
TargetCommitish = data.GitVersion.BranchName,
WorkingDirectory = "."
});
Expand Down
File renamed without changes.
74 changes: 40 additions & 34 deletions src/Directory.packages.props
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup Label="Build">
<PackageVersion Include="ControlzEx" version="7.0.0-rc0118" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
<PackageVersion Include="XAMLTools.MSBuild" Version="1.0.0-alpha0167" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageVersion Include="Caliburn.Micro" Version="4.0.212" />
<PackageVersion Include="MahApps.Metro.IconPacks.Entypo" Version="5.0.0" />
<PackageVersion Include="MahApps.Metro.IconPacks.FontAwesome" Version="5.0.0" />
<PackageVersion Include="MahApps.Metro.IconPacks.Material" Version="5.0.0" />
<PackageVersion Include="MahApps.Metro.IconPacks.Modern" Version="5.0.0" />
<PackageVersion Include="MahApps.Metro.IconPacks.Octicons" Version="5.0.0" />
<PackageVersion Include="MaterialDesignThemes" Version="3.0.1" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == false " />
<PackageVersion Include="MaterialDesignColors" Version="1.2.7" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == false " />
<PackageVersion Include="MaterialDesignThemes" Version="4.9.0" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == true " />
<PackageVersion Include="MaterialDesignColors" Version="2.1.4" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == true " />
<PackageVersion Include="NHotkey.Wpf" Version="3.0.0" />
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2792.45" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.106" />
<PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" Condition="'$(TargetFramework)' != 'net8.0-windows'" />
<PackageVersion Include="WpfAnalyzers" Version="4.1.1" />
</ItemGroup>
<ItemGroup Label="Test">
<PackageVersion Include="NUnit" Version="4.2.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.3.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
</ItemGroup>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup Label="Build">
<PackageVersion Include="ControlzEx" version="7.0.0-rc0118" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
<PackageVersion Include="XAMLTools.MSBuild" Version="1.0.0-alpha0167" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.2.0" />

<PackageVersion Include="Caliburn.Micro" Version="4.0.212" />

<PackageVersion Include="MahApps.Metro.IconPacks.Entypo" Version="5.0.1" />
<PackageVersion Include="MahApps.Metro.IconPacks.FontAwesome" Version="5.0.1" />
<PackageVersion Include="MahApps.Metro.IconPacks.Material" Version="5.0.1" />
<PackageVersion Include="MahApps.Metro.IconPacks.Modern" Version="5.0.1" />
<PackageVersion Include="MahApps.Metro.IconPacks.Octicons" Version="5.0.1" />

<PackageVersion Include="MaterialDesignThemes" Version="3.0.1" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == false " />
<PackageVersion Include="MaterialDesignColors" Version="1.2.7" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == false " />
<PackageVersion Include="MaterialDesignThemes" Version="4.9.0" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == true " />
<PackageVersion Include="MaterialDesignColors" Version="2.1.4" Condition=" $(DefineConstants.Contains(NETCOREAPP)) == true " />

<PackageVersion Include="NHotkey.Wpf" Version="3.0.0" />
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2792.45" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.106" />

<PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" Condition="'$(TargetFramework)' != 'net8.0-windows'" />

<PackageVersion Include="WpfAnalyzers" Version="4.1.1" />
</ItemGroup>
<ItemGroup Label="Test">
<PackageVersion Include="NUnit" Version="4.2.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.3.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
</ItemGroup>
</Project>

0 comments on commit 62e5e7b

Please sign in to comment.