Updating deployers for apps using shared runtime
This commit is contained in:
parent
0a8f1327b5
commit
e874f99791
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace Microsoft.AspNetCore.Server.Testing
|
||||
{
|
||||
public enum ApplicationType
|
||||
{
|
||||
Portable,
|
||||
Standalone
|
||||
}
|
||||
}
|
||||
|
|
@ -74,6 +74,8 @@ namespace Microsoft.AspNetCore.Server.Testing
|
|||
/// </summary>
|
||||
public bool PublishApplicationBeforeDeployment { get; set; }
|
||||
|
||||
public ApplicationType ApplicationType { get; set; }
|
||||
|
||||
public string PublishTargetFramework { get; set; }
|
||||
|
||||
public string PublishedApplicationRootPath { get; set; }
|
||||
|
|
|
|||
|
|
@ -52,7 +52,9 @@ namespace Microsoft.AspNetCore.Server.Testing
|
|||
string executableArgs = string.Empty;
|
||||
if (DeploymentParameters.PublishApplicationBeforeDeployment)
|
||||
{
|
||||
var executableExtension = DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? ".exe" : "";
|
||||
var executableExtension =
|
||||
DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? ".exe" :
|
||||
DeploymentParameters.ApplicationType == ApplicationType.Portable ? ".dll" : "";
|
||||
var executable = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, new DirectoryInfo(DeploymentParameters.ApplicationPath).Name + executableExtension);
|
||||
|
||||
if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr && PlatformServices.Default.Runtime.OperatingSystemPlatform != Platform.Windows)
|
||||
|
|
@ -60,6 +62,11 @@ namespace Microsoft.AspNetCore.Server.Testing
|
|||
executableName = "mono";
|
||||
executableArgs = executable;
|
||||
}
|
||||
else if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr && DeploymentParameters.ApplicationType == ApplicationType.Portable)
|
||||
{
|
||||
executableName = "dotnet";
|
||||
executableArgs = executable;
|
||||
}
|
||||
else
|
||||
{
|
||||
executableName = executable;
|
||||
|
|
|
|||
Loading…
Reference in New Issue