Remove no longer applicable workaround in run-build.ps1. Applied expression bodied properties to solution.
This commit is contained in:
parent
03b1532ebf
commit
c9ab438e6c
13 changed files with 27 additions and 124 deletions
|
@ -24,9 +24,6 @@ if ($PgoInstrument) {
|
||||||
|
|
||||||
if ($Sign) {
|
if ($Sign) {
|
||||||
$Parameters = "$Parameters -sign /p:SignCoreSdk=true"
|
$Parameters = "$Parameters -sign /p:SignCoreSdk=true"
|
||||||
|
|
||||||
# Workaround https://github.com/dotnet/arcade/issues/1776
|
|
||||||
$WarnAsError = $false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$Parameters = "$Parameters -WarnAsError `$$WarnAsError"
|
$Parameters = "$Parameters -WarnAsError `$$WarnAsError"
|
||||||
|
|
|
@ -16,15 +16,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
public bool Recursive { get; set; }
|
public bool Recursive { get; set; }
|
||||||
|
|
||||||
protected override string ToolName
|
protected override string ToolName => "chmod";
|
||||||
{
|
|
||||||
get { return "chmod"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override MessageImportance StandardOutputLoggingImportance
|
protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
|
||||||
{
|
|
||||||
get { return MessageImportance.High; } // or else the output doesn't get logged by default
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,22 +83,15 @@ namespace Microsoft.DotNet.Build.Tasks
|
||||||
return toolResult;
|
return toolResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string ToolName
|
protected override string ToolName => "crossgen2";
|
||||||
{
|
|
||||||
get { return "crossgen2"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override MessageImportance StandardOutputLoggingImportance
|
protected override MessageImportance StandardOutputLoggingImportance
|
||||||
{
|
|
||||||
// Default is low, but we want to see output at normal verbosity.
|
// Default is low, but we want to see output at normal verbosity.
|
||||||
get { return MessageImportance.Normal; }
|
=> MessageImportance.Normal;
|
||||||
}
|
|
||||||
|
|
||||||
protected override MessageImportance StandardErrorLoggingImportance
|
protected override MessageImportance StandardErrorLoggingImportance
|
||||||
{
|
|
||||||
// This turns stderr messages into msbuild errors below.
|
// This turns stderr messages into msbuild errors below.
|
||||||
get { return MessageImportance.High; }
|
=> MessageImportance.High;
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
|
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,10 +45,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return $"-v {PackageVersion}";
|
return $"-v {PackageVersion}";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override MessageImportance StandardOutputLoggingImportance
|
protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
|
||||||
{
|
|
||||||
get { return MessageImportance.High; } // or else the output doesn't get logged by default
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,15 +39,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
public string WorkingDirectory { get; set; }
|
public string WorkingDirectory { get; set; }
|
||||||
|
|
||||||
protected override string ToolName
|
protected override string ToolName => $"dotnet{Constants.ExeSuffix}";
|
||||||
{
|
|
||||||
get { return $"dotnet{Constants.ExeSuffix}"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override MessageImportance StandardOutputLoggingImportance
|
protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
|
||||||
{
|
|
||||||
get { return MessageImportance.High; } // or else the output doesn't get logged by default
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
|
|
|
@ -189,15 +189,9 @@ namespace Microsoft.DotNet.Build.Tasks
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string ToolName
|
protected override string ToolName => "tar";
|
||||||
{
|
|
||||||
get { return "tar"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override MessageImportance StandardOutputLoggingImportance
|
protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
|
||||||
{
|
|
||||||
get { return MessageImportance.High; } // or else the output doesn't get logged by default
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,15 +93,9 @@ namespace Microsoft.DotNet.Build.Tasks
|
||||||
return base.Execute();
|
return base.Execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string ToolName
|
protected override string ToolName => "tar";
|
||||||
{
|
|
||||||
get { return "tar"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override MessageImportance StandardOutputLoggingImportance
|
protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
|
||||||
{
|
|
||||||
get { return MessageImportance.High; } // or else the output doesn't get logged by default
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,64 +16,28 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
private string _versionSuffix;
|
private string _versionSuffix;
|
||||||
private bool _serviceable;
|
private bool _serviceable;
|
||||||
|
|
||||||
private string OutputOption
|
private string OutputOption => _outputDirectory == string.Empty ?
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _outputDirectory == string.Empty ?
|
|
||||||
"" :
|
"" :
|
||||||
$"-o \"{_outputDirectory}\"";
|
$"-o \"{_outputDirectory}\"";
|
||||||
}
|
private string BuildBasePathOption => _buildBasePath == string.Empty ?
|
||||||
}
|
|
||||||
private string BuildBasePathOption
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _buildBasePath == string.Empty ?
|
|
||||||
"" :
|
"" :
|
||||||
$"-b \"{_buildBasePath}\"";
|
$"-b \"{_buildBasePath}\"";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string TempOutputOption
|
private string TempOutputOption => _tempOutputDirectory == string.Empty ?
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _tempOutputDirectory == string.Empty ?
|
|
||||||
"" :
|
"" :
|
||||||
$"-t {_tempOutputDirectory}";
|
$"-t {_tempOutputDirectory}";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string ConfigurationOption
|
private string ConfigurationOption => _configuration == string.Empty ?
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _configuration == string.Empty ?
|
|
||||||
"" :
|
"" :
|
||||||
$"-c {_configuration}";
|
$"-c {_configuration}";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string VersionSuffixOption
|
private string VersionSuffixOption => _versionSuffix == string.Empty ?
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _versionSuffix == string.Empty ?
|
|
||||||
"" :
|
"" :
|
||||||
$"--version-suffix {_versionSuffix}";
|
$"--version-suffix {_versionSuffix}";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string ServiceableOption
|
private string ServiceableOption => _serviceable ?
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _serviceable ?
|
|
||||||
$"--serviceable" :
|
$"--serviceable" :
|
||||||
"";
|
"";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public PackCommand WithConfiguration(string configuration)
|
public PackCommand WithConfiguration(string configuration)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,13 +19,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
internal static readonly string DirectorySeparatorStr = new string(DirectorySeparatorChar, 1);
|
internal static readonly string DirectorySeparatorStr = new string(DirectorySeparatorChar, 1);
|
||||||
internal const char VolumeSeparatorChar = ':';
|
internal const char VolumeSeparatorChar = ':';
|
||||||
|
|
||||||
private static bool IsUnixLikePlatform
|
private static bool IsUnixLikePlatform => Path.DirectorySeparatorChar == '/';
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Path.DirectorySeparatorChar == '/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static bool IsDirectorySeparator(char c)
|
internal static bool IsDirectorySeparator(char c)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,12 +42,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Path
|
public string Path => _path;
|
||||||
{
|
|
||||||
get { return _path; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public DirectoryInfo DirectoryInfo => new DirectoryInfo(Path);
|
public DirectoryInfo DirectoryInfo => new DirectoryInfo(Path);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -55,12 +55,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
{
|
{
|
||||||
return new FileStream(_path, FileMode.Open, access);
|
return new FileStream(_path, FileMode.Open, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Path
|
public string Path => _path;
|
||||||
{
|
|
||||||
get { return _path; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public TempFile WriteAllText(string content, Encoding encoding)
|
public TempFile WriteAllText(string content, Encoding encoding)
|
||||||
{
|
{
|
||||||
File.WriteAllText(_path, content, encoding);
|
File.WriteAllText(_path, content, encoding);
|
||||||
|
|
|
@ -73,17 +73,11 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
Build = new FileInfo(Path.Combine(inventoryFileDirectory.FullName, "build.txt"));
|
Build = new FileInfo(Path.Combine(inventoryFileDirectory.FullName, "build.txt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<FileInfo> AllInventoryFiles
|
public IEnumerable<FileInfo> AllInventoryFiles => new List<FileInfo>
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new List<FileInfo>
|
|
||||||
{
|
{
|
||||||
Source,
|
Source,
|
||||||
Restore,
|
Restore,
|
||||||
Build
|
Build
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,13 +34,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static string RepoRoot
|
protected static string RepoRoot => RepoDirectoriesProvider.RepoRoot;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return RepoDirectoriesProvider.RepoRoot;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static TestAssets TestAssets
|
public static TestAssets TestAssets
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue