From 8bccd752274bf9062897d4016221a6067240968c Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 5 May 2020 03:03:31 +0200 Subject: [PATCH] invert trim option --- GameBundle/Options.cs | 4 ++-- GameBundle/Program.cs | 2 +- Test/Bundle.bat | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GameBundle/Options.cs b/GameBundle/Options.cs index abed456..c0e4b7c 100644 --- a/GameBundle/Options.cs +++ b/GameBundle/Options.cs @@ -28,8 +28,8 @@ namespace GameBundle { public IEnumerable ExcludedFiles { get; set; } [Option("32-bit", HelpText = "Publish for 32 bit instead of 64 bit. Note that this is only possible on Windows")] public bool Publish32Bit { get; set; } - [Option('t', "no-trim", HelpText = "Skip trimming the application when publishing")] - public bool NoTrim { get; set; } + [Option('t', "trim", HelpText = "Trim the application when publishing")] + public bool Trim { get; set; } [Option('c', "config", Default = "Release", HelpText = "The build configuration to use")] public string BuildConfig { get; set; } [Option("lib-name", Default = "Lib", HelpText = "The name of the library folder that is created")] diff --git a/GameBundle/Program.cs b/GameBundle/Program.cs index dba7fd1..158edec 100644 --- a/GameBundle/Program.cs +++ b/GameBundle/Program.cs @@ -50,7 +50,7 @@ namespace GameBundle { } private static void Publish(Options options, FileInfo proj, string path, string rid) { - RunProcess(options, "dotnet", $"publish {proj.FullName} -o {path} -r {rid} -c {options.BuildConfig} /p:PublishTrimmed={!options.NoTrim}"); + RunProcess(options, "dotnet", $"publish {proj.FullName} -o {path} -r {rid} -c {options.BuildConfig} /p:PublishTrimmed={options.Trim}"); // Run beauty var excludes = '"' + string.Join(";", options.ExcludedFiles) + '"'; diff --git a/Test/Bundle.bat b/Test/Bundle.bat index d852d22..0182851 100644 --- a/Test/Bundle.bat +++ b/Test/Bundle.bat @@ -1 +1 @@ -"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -wlmbt -s Test.csproj -o bin/Bundled -v \ No newline at end of file +"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -wlmb -s Test.csproj -o bin/Bundled -v \ No newline at end of file