mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Removed all instances of interpolated strings from editor scripts so we don't get compiler errors on old versions of .NET in Unity 2018 (#633)
Co-authored-by: Zac <zac@dickinson.xyz> Co-authored-by: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Co-authored-by: David Finol <davidmfinol@gmail.com>
This commit is contained in:
parent
b11b6a6f2c
commit
83c85328dd
@ -74,7 +74,7 @@ namespace UnityBuilderAction
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"Failed to run default addressables build:\n{e}");
|
||||
Debug.LogError("Failed to run default addressables build:\n" + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,17 +56,17 @@ namespace UnityBuilderAction.Input
|
||||
case "androidStudioProject":
|
||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
|
||||
if (buildAppBundle != null)
|
||||
buildAppBundle.SetValue(null, false);
|
||||
buildAppBundle.SetValue(null, false, null);
|
||||
break;
|
||||
case "androidAppBundle":
|
||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
||||
if (buildAppBundle != null)
|
||||
buildAppBundle.SetValue(null, true);
|
||||
buildAppBundle.SetValue(null, true, null);
|
||||
break;
|
||||
case "androidPackage":
|
||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
||||
if (buildAppBundle != null)
|
||||
buildAppBundle.SetValue(null, false);
|
||||
buildAppBundle.SetValue(null, false, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace UnityBuilderAction.Input
|
||||
}
|
||||
|
||||
if (!Enum.IsDefined(typeof(BuildTarget), buildTarget)) {
|
||||
Console.WriteLine($"{buildTarget} is not a defined {nameof(BuildTarget)}");
|
||||
Console.WriteLine(buildTarget + " is not a defined " + typeof(BuildTarget).Name);
|
||||
EditorApplication.Exit(121);
|
||||
}
|
||||
|
||||
@ -41,10 +41,10 @@ namespace UnityBuilderAction.Input
|
||||
const string defaultCustomBuildName = "TestBuild";
|
||||
string customBuildName;
|
||||
if (!validatedOptions.TryGetValue("customBuildName", out customBuildName)) {
|
||||
Console.WriteLine($"Missing argument -customBuildName, defaulting to {defaultCustomBuildName}.");
|
||||
Console.WriteLine("Missing argument -customBuildName, defaulting to" + defaultCustomBuildName);
|
||||
validatedOptions.Add("customBuildName", defaultCustomBuildName);
|
||||
} else if (customBuildName == "") {
|
||||
Console.WriteLine($"Invalid argument -customBuildName, defaulting to {defaultCustomBuildName}.");
|
||||
Console.WriteLine("Invalid argument -customBuildName, defaulting to" + defaultCustomBuildName);
|
||||
validatedOptions.Add("customBuildName", defaultCustomBuildName);
|
||||
}
|
||||
|
||||
@ -57,11 +57,11 @@ namespace UnityBuilderAction.Input
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
|
||||
Console.WriteLine(
|
||||
$"{EOL}" +
|
||||
$"###########################{EOL}" +
|
||||
$"# Parsing settings #{EOL}" +
|
||||
$"###########################{EOL}" +
|
||||
$"{EOL}"
|
||||
EOL +
|
||||
"###########################" + EOL +
|
||||
"# Parsing settings #" + EOL +
|
||||
"###########################" + EOL +
|
||||
EOL
|
||||
);
|
||||
|
||||
// Extract flags with optional values
|
||||
@ -78,7 +78,7 @@ namespace UnityBuilderAction.Input
|
||||
string displayValue = secret ? "*HIDDEN*" : "\"" + value + "\"";
|
||||
|
||||
// Assign
|
||||
Console.WriteLine($"Found flag \"{flag}\" with value {displayValue}.");
|
||||
Console.WriteLine("Found flag \"" + flag + "\" with value " + displayValue);
|
||||
providedArguments.Add(flag, value);
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace UnityBuilderAction.Reporting
|
||||
prefix = "error";
|
||||
break;
|
||||
}
|
||||
Console.WriteLine($"{Environment.NewLine}::{prefix} ::{condition}{Environment.NewLine}{stackTrace}");
|
||||
Console.WriteLine(Environment.NewLine + "::" + prefix + "::" + condition + Environment.NewLine + stackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,16 +11,16 @@ namespace UnityBuilderAction.Reporting
|
||||
public static void ReportSummary(BuildSummary summary)
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"{EOL}" +
|
||||
$"###########################{EOL}" +
|
||||
$"# Build results #{EOL}" +
|
||||
$"###########################{EOL}" +
|
||||
$"{EOL}" +
|
||||
$"Duration: {summary.totalTime.ToString()}{EOL}" +
|
||||
$"Warnings: {summary.totalWarnings.ToString()}{EOL}" +
|
||||
$"Errors: {summary.totalErrors.ToString()}{EOL}" +
|
||||
$"Size: {summary.totalSize.ToString()} bytes{EOL}" +
|
||||
$"{EOL}"
|
||||
EOL +
|
||||
"###########################" + EOL +
|
||||
"# Build results #" + EOL +
|
||||
"###########################" + EOL +
|
||||
EOL +
|
||||
"Duration: " + summary.totalTime.ToString() + EOL +
|
||||
"Warnings: " + summary.totalWarnings.ToString() + EOL +
|
||||
"Errors: " + summary.totalErrors.ToString() + EOL +
|
||||
"Size: " + summary.totalSize.ToString() + " bytes" + EOL +
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,11 @@ namespace UnityBuilderAction.Versioning
|
||||
version = GetSemanticCommitVersion();
|
||||
Console.WriteLine("Repository has a valid version tag.");
|
||||
} else {
|
||||
version = $"0.0.{GetTotalNumberOfCommits()}";
|
||||
version = "0.0." + GetTotalNumberOfCommits();
|
||||
Console.WriteLine("Repository does not have tags to base the version on.");
|
||||
}
|
||||
|
||||
Console.WriteLine($"Version is {version}");
|
||||
Console.WriteLine("Version is " + version);
|
||||
|
||||
return version;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user