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)
|
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":
|
case "androidStudioProject":
|
||||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
|
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
|
||||||
if (buildAppBundle != null)
|
if (buildAppBundle != null)
|
||||||
buildAppBundle.SetValue(null, false);
|
buildAppBundle.SetValue(null, false, null);
|
||||||
break;
|
break;
|
||||||
case "androidAppBundle":
|
case "androidAppBundle":
|
||||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
||||||
if (buildAppBundle != null)
|
if (buildAppBundle != null)
|
||||||
buildAppBundle.SetValue(null, true);
|
buildAppBundle.SetValue(null, true, null);
|
||||||
break;
|
break;
|
||||||
case "androidPackage":
|
case "androidPackage":
|
||||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
||||||
if (buildAppBundle != null)
|
if (buildAppBundle != null)
|
||||||
buildAppBundle.SetValue(null, false);
|
buildAppBundle.SetValue(null, false, null);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace UnityBuilderAction.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Enum.IsDefined(typeof(BuildTarget), buildTarget)) {
|
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);
|
EditorApplication.Exit(121);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,10 +41,10 @@ namespace UnityBuilderAction.Input
|
|||||||
const string defaultCustomBuildName = "TestBuild";
|
const string defaultCustomBuildName = "TestBuild";
|
||||||
string customBuildName;
|
string customBuildName;
|
||||||
if (!validatedOptions.TryGetValue("customBuildName", out 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);
|
validatedOptions.Add("customBuildName", defaultCustomBuildName);
|
||||||
} else if (customBuildName == "") {
|
} else if (customBuildName == "") {
|
||||||
Console.WriteLine($"Invalid argument -customBuildName, defaulting to {defaultCustomBuildName}.");
|
Console.WriteLine("Invalid argument -customBuildName, defaulting to" + defaultCustomBuildName);
|
||||||
validatedOptions.Add("customBuildName", defaultCustomBuildName);
|
validatedOptions.Add("customBuildName", defaultCustomBuildName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,11 +57,11 @@ namespace UnityBuilderAction.Input
|
|||||||
string[] args = Environment.GetCommandLineArgs();
|
string[] args = Environment.GetCommandLineArgs();
|
||||||
|
|
||||||
Console.WriteLine(
|
Console.WriteLine(
|
||||||
$"{EOL}" +
|
EOL +
|
||||||
$"###########################{EOL}" +
|
"###########################" + EOL +
|
||||||
$"# Parsing settings #{EOL}" +
|
"# Parsing settings #" + EOL +
|
||||||
$"###########################{EOL}" +
|
"###########################" + EOL +
|
||||||
$"{EOL}"
|
EOL
|
||||||
);
|
);
|
||||||
|
|
||||||
// Extract flags with optional values
|
// Extract flags with optional values
|
||||||
@ -78,7 +78,7 @@ namespace UnityBuilderAction.Input
|
|||||||
string displayValue = secret ? "*HIDDEN*" : "\"" + value + "\"";
|
string displayValue = secret ? "*HIDDEN*" : "\"" + value + "\"";
|
||||||
|
|
||||||
// Assign
|
// Assign
|
||||||
Console.WriteLine($"Found flag \"{flag}\" with value {displayValue}.");
|
Console.WriteLine("Found flag \"" + flag + "\" with value " + displayValue);
|
||||||
providedArguments.Add(flag, value);
|
providedArguments.Add(flag, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace UnityBuilderAction.Reporting
|
|||||||
prefix = "error";
|
prefix = "error";
|
||||||
break;
|
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)
|
public static void ReportSummary(BuildSummary summary)
|
||||||
{
|
{
|
||||||
Console.WriteLine(
|
Console.WriteLine(
|
||||||
$"{EOL}" +
|
EOL +
|
||||||
$"###########################{EOL}" +
|
"###########################" + EOL +
|
||||||
$"# Build results #{EOL}" +
|
"# Build results #" + EOL +
|
||||||
$"###########################{EOL}" +
|
"###########################" + EOL +
|
||||||
$"{EOL}" +
|
EOL +
|
||||||
$"Duration: {summary.totalTime.ToString()}{EOL}" +
|
"Duration: " + summary.totalTime.ToString() + EOL +
|
||||||
$"Warnings: {summary.totalWarnings.ToString()}{EOL}" +
|
"Warnings: " + summary.totalWarnings.ToString() + EOL +
|
||||||
$"Errors: {summary.totalErrors.ToString()}{EOL}" +
|
"Errors: " + summary.totalErrors.ToString() + EOL +
|
||||||
$"Size: {summary.totalSize.ToString()} bytes{EOL}" +
|
"Size: " + summary.totalSize.ToString() + " bytes" + EOL +
|
||||||
$"{EOL}"
|
EOL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@ namespace UnityBuilderAction.Versioning
|
|||||||
version = GetSemanticCommitVersion();
|
version = GetSemanticCommitVersion();
|
||||||
Console.WriteLine("Repository has a valid version tag.");
|
Console.WriteLine("Repository has a valid version tag.");
|
||||||
} else {
|
} else {
|
||||||
version = $"0.0.{GetTotalNumberOfCommits()}";
|
version = "0.0." + GetTotalNumberOfCommits();
|
||||||
Console.WriteLine("Repository does not have tags to base the version on.");
|
Console.WriteLine("Repository does not have tags to base the version on.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine($"Version is {version}");
|
Console.WriteLine("Version is " + version);
|
||||||
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user