diff --git a/GameBundle/Options.cs b/GameBundle/Options.cs index c05493a..f16df56 100644 --- a/GameBundle/Options.cs +++ b/GameBundle/Options.cs @@ -62,6 +62,8 @@ namespace GameBundle { public string BuildArgs { get; set; } [Option('n', "name-builds", HelpText = "Name the build output directories by the name of the executable")] public bool NameBuilds { get; set; } + [Option('N', "name-addition", HelpText = "An additional string of text that should be included in the names of the output directories")] + public string NameAddition { get; set; } } } \ No newline at end of file diff --git a/GameBundle/Program.cs b/GameBundle/Program.cs index efb9d80..8bfff99 100644 --- a/GameBundle/Program.cs +++ b/GameBundle/Program.cs @@ -176,8 +176,10 @@ namespace GameBundle { return new Regex(s.Replace(".", "[.]").Replace("*", ".*").Replace("?", ".")); } - private static DirectoryInfo GetBuildDir(Options options, string osName) { - return new DirectoryInfo(Path.Combine(Path.GetFullPath(options.OutputDirectory), osName)); + private static DirectoryInfo GetBuildDir(Options options, string name) { + if (options.NameAddition != null) + name = $"{options.NameAddition}-{name}"; + return new DirectoryInfo(Path.Combine(Path.GetFullPath(options.OutputDirectory), name)); } private static string GetBuildName(Options options, DirectoryInfo buildDir) { diff --git a/Test/Bundle.bat b/Test/Bundle.bat index c1db647..e8a6459 100644 --- a/Test/Bundle.bat +++ b/Test/Bundle.bat @@ -1 +1 @@ -"../GameBundle/bin/Debug/net6.0/GameBundle.exe" -wlmWL -bzn -s Test.csproj -o bin/Bundled -v --mac-bundle-ignore macmain.txt \ No newline at end of file +"../GameBundle/bin/Debug/net6.0/GameBundle.exe" -wlmWL -bzn -s Test.csproj -o bin/Bundled -v --mac-bundle-ignore macmain.txt -N 1.0.0 \ No newline at end of file