invert trim option

This commit is contained in:
Ellpeck 2020-05-05 03:03:31 +02:00
parent 2f7e63edde
commit 8bccd75227
3 changed files with 4 additions and 4 deletions

View file

@ -28,8 +28,8 @@ namespace GameBundle {
public IEnumerable<string> 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")]

View file

@ -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) + '"';

View file

@ -1 +1 @@
"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -wlmbt -s Test.csproj -o bin/Bundled -v
"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -wlmb -s Test.csproj -o bin/Bundled -v