File tree 2 files changed +24
-2
lines changed
2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public BuildCommand(string[] args)
42
42
private string _paramPackageJson = "package-json" ;
43
43
private string _paramForceNodeInstall = "install-modules" ;
44
44
private string _manifest = "manifest" ;
45
+ private string _paramPublishReadyToRun = "PublishReadyToRun" ;
45
46
46
47
public Task < bool > ExecuteAsync ( )
47
48
{
@@ -95,7 +96,17 @@ public Task<bool> ExecuteAsync()
95
96
96
97
Console . WriteLine ( $ "Build ASP.NET Core App for { platformInfo . NetCorePublishRid } under { configuration } -Configuration...") ;
97
98
98
- var resultCode = ProcessHelper . CmdExecute ( $ "dotnet publish -r { platformInfo . NetCorePublishRid } -c { configuration } --output \" { tempBinPath } \" /p:PublishReadyToRun=true --no-self-contained", Directory . GetCurrentDirectory ( ) ) ;
99
+ string publishReadyToRun = "/p:PublishReadyToRun=" ;
100
+ if ( parser . Arguments . ContainsKey ( _paramPublishReadyToRun ) )
101
+ {
102
+ publishReadyToRun += parser . Arguments [ _paramPublishReadyToRun ] [ 0 ] ;
103
+ }
104
+ else
105
+ {
106
+ publishReadyToRun += "true" ;
107
+ }
108
+
109
+ var resultCode = ProcessHelper . CmdExecute ( $ "dotnet publish -r { platformInfo . NetCorePublishRid } -c { configuration } --output \" { tempBinPath } \" { publishReadyToRun } --self-contained", Directory . GetCurrentDirectory ( ) ) ;
99
110
100
111
if ( resultCode != 0 )
101
112
{
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ public StartElectronCommand(string[] args)
26
26
private string _arguments = "args" ;
27
27
private string _manifest = "manifest" ;
28
28
private string _clearCache = "clear-cache" ;
29
+ private string _paramPublishReadyToRun = "PublishReadyToRun" ;
29
30
30
31
public Task < bool > ExecuteAsync ( )
31
32
{
@@ -62,9 +63,19 @@ public Task<bool> ExecuteAsync()
62
63
string tempBinPath = Path . Combine ( tempPath , "bin" ) ;
63
64
var resultCode = 0 ;
64
65
66
+ string publishReadyToRun = "/p:PublishReadyToRun=" ;
67
+ if ( parser . Arguments . ContainsKey ( _paramPublishReadyToRun ) )
68
+ {
69
+ publishReadyToRun += parser . Arguments [ _paramPublishReadyToRun ] [ 0 ] ;
70
+ }
71
+ else
72
+ {
73
+ publishReadyToRun += "true" ;
74
+ }
75
+
65
76
if ( parser != null && ! parser . Arguments . ContainsKey ( "watch" ) )
66
77
{
67
- resultCode = ProcessHelper . CmdExecute ( $ "dotnet publish -r { platformInfo . NetCorePublishRid } --output \" { tempBinPath } \" /p:PublishReadyToRun=true --no-self-contained", aspCoreProjectPath ) ;
78
+ resultCode = ProcessHelper . CmdExecute ( $ "dotnet publish -r { platformInfo . NetCorePublishRid } --output \" { tempBinPath } \" { publishReadyToRun } --no-self-contained", aspCoreProjectPath ) ;
68
79
}
69
80
70
81
if ( resultCode != 0 )
You can’t perform that action at this time.
0 commit comments