@@ -44,7 +44,7 @@ function CrossGen([string] $runtime, [string] $publishTarget, [string] $privateS
44
44
45
45
# Modify web.config for inproc
46
46
dotnet tool install - g dotnet- xdt -- version 2.1 .0 - rc.1
47
- dotnet- xdt - s " $privateSiteExtensionPath \web.config" - t " $privateSiteExtensionPath \web.InProcess.xdt" - o " $privateSiteExtensionPath \web.config"
47
+ dotnet- xdt - s " $privateSiteExtensionPath \web.config" - t " $privateSiteExtensionPath \web.InProcess.$runtime . xdt" - o " $privateSiteExtensionPath \web.config"
48
48
49
49
$successfullDlls = @ ()
50
50
$failedDlls = @ ()
@@ -87,8 +87,9 @@ function CrossGen([string] $runtime, [string] $publishTarget, [string] $privateS
87
87
}
88
88
89
89
90
- # If not self-contained
91
- Copy-Item - Path $privateSiteExtensionPath \runtimes\win\native\* - Destination $privateSiteExtensionPath - Force
90
+ if ($runtime -eq " win-x86" ) {
91
+ Copy-Item - Path $privateSiteExtensionPath \runtimes\win\native\* - Destination $privateSiteExtensionPath - Force
92
+ }
92
93
93
94
# read-host "Press ENTER to continue..."
94
95
Remove-Item - Recurse - Force $selfContained - ErrorAction SilentlyContinue
@@ -116,7 +117,26 @@ function DownloadNupkg([string] $nupkgPath, [string[]]$from, [string[]]$to) {
116
117
}
117
118
}
118
119
119
- function BuildPackages ([string ] $runtime <# , [bool] $isSelfContained#> ) {
120
+ function BuildPackages ([bool ] $isNoRuntime ) {
121
+ if ($isNoRuntime ) {
122
+ BuildOutput " "
123
+ CreateZips " .no-runtime"
124
+ } else {
125
+ BuildOutput " win-x86"
126
+ BuildOutput " win-x64"
127
+
128
+ New-Item - Itemtype directory - path $buildOutput \publish.runtime\SiteExtensions\Functions
129
+ Move-Item - Path $buildOutput \publish.win- x86\SiteExtensions\Functions - Destination $buildOutput \publish.runtime\SiteExtensions\Functions\32bit - Force
130
+ Move-Item - Path $buildOutput \publish.win- x64\SiteExtensions\Functions - Destination $buildOutput \publish.runtime\SiteExtensions\Functions\64bit - Force
131
+ Move-Item - Path $buildOutput \publish.runtime\SiteExtensions\Functions\32bit\applicationHost.xdt - Destination $buildOutput \publish.runtime\SiteExtensions\Functions - Force
132
+ Remove-Item - Path $buildOutput \publish.runtime\SiteExtensions\Functions\64bit\applicationHost.xdt
133
+
134
+ CreateZips " .runtime"
135
+ }
136
+ }
137
+
138
+
139
+ function BuildOutput ([string ] $runtime ) {
120
140
$runtimeSuffix = " "
121
141
if (! [string ]::IsNullOrEmpty($runtime )) {
122
142
$runtimeSuffix = " .$runtime "
@@ -128,17 +148,28 @@ function BuildPackages([string] $runtime<#, [bool] $isSelfContained#>) {
128
148
$siteExtensionPath = " $publishTarget \SiteExtensions"
129
149
$privateSiteExtensionPath = " $siteExtensionPath \Functions"
130
150
131
- dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - o " $privateSiteExtensionPath " - v q / p:BuildNumber= $buildNumber / p:IsPackable= false - c Release
132
- # dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj -r $runtime -o "$privateSiteExtensionPath" -v q /p:BuildNumber=$buildNumber /p:IsPackable=false -c Release
151
+ if ($runtime -eq " win-x86" -or $runtime -eq " " ) {
152
+ dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - o " $privateSiteExtensionPath " - v q / p:BuildNumber= $buildNumber / p:IsPackable= false - c Release
153
+ } else {
154
+ # There are no preinstalled 'x64 .NET Core'/'x64 ASP.NET Core' on the stamp so we we need to build self-contained package for x64.
155
+ dotnet publish .\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj - r $runtime - o " $privateSiteExtensionPath " - v q / p:BuildNumber= $buildNumber / p:IsPackable= false - c Release
156
+ }
133
157
134
158
# replace IL dlls with crossgen dlls
135
159
if (! [string ]::IsNullOrEmpty($runtime )) {
136
160
CrossGen $runtime $publishTarget $privateSiteExtensionPath
137
161
}
162
+ }
138
163
139
- # Do not put siffux to win-x86 zips names
140
- if ($runtime -eq " win-x86" ) {
141
- $runtimeSuffix = " " ;
164
+
165
+ function CreateZips ([string ] $runtimeSuffix ) {
166
+ $publishTarget = " $buildOutput \publish$runtimeSuffix "
167
+ $siteExtensionPath = " $publishTarget \SiteExtensions"
168
+ $privateSiteExtensionPath = " $siteExtensionPath \Functions"
169
+
170
+ # We do not want .runtime as suffix for zips
171
+ if ($runtimeSuffix -eq " .runtime" ) {
172
+ $runtimesuffix = " " ;
142
173
}
143
174
144
175
ZipContent $privateSiteExtensionPath " $buildOutput \Functions.Binaries.$extensionVersion -alpha$runtimeSuffix .zip"
@@ -184,9 +215,9 @@ $bypassPackaging = $env:APPVEYOR_PULL_REQUEST_NUMBER -and -not $env:APPVEYOR_PUL
184
215
if ($bypassPackaging ){
185
216
Write-Host " Bypassing artifact packaging and CrossGen for pull request." - ForegroundColor Yellow
186
217
} else {
187
- # build IL extensions
188
- BuildPackages " "
218
+ # build no-runntime extension
219
+ BuildPackages 1
189
220
190
- # build win-x86 extensions
191
- BuildPackages " win-x86 "
221
+ # build win-x86 and win-x64 extension
222
+ BuildPackages 0
192
223
}
0 commit comments