mirror of
https://github.com/Ellpeck/GameBundle.git
synced 2024-11-26 02:18:35 +01:00
allow passing additional arguments to the publish command
This commit is contained in:
parent
8b27505359
commit
08413ae9d7
4 changed files with 9 additions and 5 deletions
|
@ -13,7 +13,7 @@
|
||||||
<PackageIconUrl>https://raw.githubusercontent.com/Ellpeck/GameBundle/master/Logo.png</PackageIconUrl>
|
<PackageIconUrl>https://raw.githubusercontent.com/Ellpeck/GameBundle/master/Logo.png</PackageIconUrl>
|
||||||
<PackAsTool>true</PackAsTool>
|
<PackAsTool>true</PackAsTool>
|
||||||
<ToolCommandName>gamebundle</ToolCommandName>
|
<ToolCommandName>gamebundle</ToolCommandName>
|
||||||
<VersionPrefix>1.3.0</VersionPrefix>
|
<VersionPrefix>1.3.1</VersionPrefix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -38,6 +38,8 @@ namespace GameBundle {
|
||||||
public string LibFolder { get; set; }
|
public string LibFolder { get; set; }
|
||||||
[Option('n', "name-builds", HelpText = "Name the build output directories by the project's name")]
|
[Option('n', "name-builds", HelpText = "Name the build output directories by the project's name")]
|
||||||
public bool NameBuilds { get; set; }
|
public bool NameBuilds { get; set; }
|
||||||
|
[Option('a', "build-args", HelpText = "Additional arguments that should be passed to the dotnet publish command")]
|
||||||
|
public string BuildArgs { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,7 +11,10 @@ namespace GameBundle {
|
||||||
internal static class Program {
|
internal static class Program {
|
||||||
|
|
||||||
private static int Main(string[] args) {
|
private static int Main(string[] args) {
|
||||||
return Parser.Default.ParseArguments<Options>(args).MapResult(Run, _ => -1);
|
return new Parser(c => {
|
||||||
|
c.HelpWriter = Console.Error;
|
||||||
|
c.EnableDashDash = true;
|
||||||
|
}).ParseArguments<Options>(args).MapResult(Run, _ => -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int Run(Options options) {
|
private static int Run(Options options) {
|
||||||
|
@ -60,7 +63,7 @@ namespace GameBundle {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int Publish(Options options, FileInfo proj, string path, string rid, Action additionalAction = null) {
|
private static int Publish(Options options, FileInfo proj, string path, string rid, Action additionalAction = null) {
|
||||||
var publishResult = RunProcess(options, "dotnet", $"publish {proj.FullName} -o {path} -r {rid} -c {options.BuildConfig} /p:PublishTrimmed={options.Trim}");
|
var publishResult = RunProcess(options, "dotnet", $"publish {proj.FullName} -o {path} -r {rid} -c {options.BuildConfig} /p:PublishTrimmed={options.Trim} {options.BuildArgs}");
|
||||||
if (publishResult != 0)
|
if (publishResult != 0)
|
||||||
return publishResult;
|
return publishResult;
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
<PackageReference Include="Contentless" Version="2.0.*" />
|
<PackageReference Include="Contentless" Version="2.0.*" />
|
||||||
<PackageReference Include="MLEM.Startup" Version="3.2.*" />
|
<PackageReference Include="MLEM.Startup" Version="3.2.*" />
|
||||||
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.*" />
|
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.*" />
|
||||||
<!--http://teamcity.monogame.net/guestAuth/app/nuget/v1/FeedService.svc/-->
|
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1231-develop" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Reference in a new issue