diff --git a/Directory.Build.props b/Directory.Build.props index 791baae..7571b90 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -23,4 +23,26 @@ $(NoWarn);CS1591 + + + CommandForge + poli0981 + poli0981 + Copyright © 2026 poli0981 + Run complex Windows system commands through a visual, categorized interface. + https://github.com/poli0981/CommandForge + https://github.com/poli0981/CommandForge + git + 1.0.0 + + diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 18826d7..0217dcc 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -37,7 +37,7 @@ Write-Host "Publishing CommandForge $Version ($Runtime, $Configuration)..." -For dotnet publish $wpfProject ` -c $Configuration -r $Runtime --self-contained true ` -p:PublishSingleFile=false ` - -p:Version=$Version -p:InformationalVersion=$Version ` + -p:Version=$Version -p:FileVersion=$Version -p:InformationalVersion=$Version ` -o $publishDir # vpk is the Velopack CLI: dotnet tool install -g vpk @@ -48,6 +48,8 @@ if (-not (Get-Command vpk -ErrorAction SilentlyContinue)) { Write-Host "Packing with Velopack..." -ForegroundColor Cyan vpk pack ` --packId CommandForge ` + --packTitle CommandForge ` + --packAuthors poli0981 ` --packVersion $Version ` --packDir $publishDir ` --mainExe CommandForge.Wpf.exe diff --git a/tests/CommandForge.Tests/AssemblyMetadataTests.cs b/tests/CommandForge.Tests/AssemblyMetadataTests.cs new file mode 100644 index 0000000..255288d --- /dev/null +++ b/tests/CommandForge.Tests/AssemblyMetadataTests.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using CommandForge.Domain; + +namespace CommandForge.Tests; + +/// +/// Verifies the package/assembly metadata declared in Directory.Build.props is stamped into +/// the built assemblies. This metadata is surfaced in Settings -> About, the Report-Bug +/// template, the file properties, and the Velopack installer (--packAuthors). +/// +public sealed class AssemblyMetadataTests +{ + // Domain is the lowest layer and inherits the same Directory.Build.props metadata as the rest. + private static readonly Assembly Target = typeof(CommandDefinition).Assembly; + + [Fact] + public void Assembly_HasExpectedCompany() + => Assert.Equal("poli0981", Target.GetCustomAttribute()?.Company); + + [Fact] + public void Assembly_HasExpectedProduct() + => Assert.Equal("CommandForge", Target.GetCustomAttribute()?.Product); + + [Fact] + public void Assembly_HasCopyrightWithOwner() + { + var copyright = Target.GetCustomAttribute()?.Copyright; + + Assert.NotNull(copyright); + Assert.Contains("poli0981", copyright, StringComparison.Ordinal); + } +}