added the ability to have additional text in the file name

This commit is contained in:
Ell 2022-08-17 21:49:59 +02:00
parent 3fd8f41b35
commit b3218532e8
3 changed files with 7 additions and 3 deletions

View file

@ -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; }
}
}

View file

@ -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) {

View file

@ -1 +1 @@
"../GameBundle/bin/Debug/net6.0/GameBundle.exe" -wlmWL -bzn -s Test.csproj -o bin/Bundled -v --mac-bundle-ignore macmain.txt
"../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