Skip to content

Commit 93d4879

Browse files
authored
fix oob pipeline (#24585)
1 parent c8b06c8 commit 93d4879

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

build.proj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,7 @@
256256
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoTools)CleanupBuild.ps1 -BuildConfig $(Configuration) -GenerateDocumentationFile $(GenerateDocumentationFile) &quot;" />
257257

258258
<Error Condition="'$(NuGetKey)' == ''" Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
259-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoTools)PublishModules.ps1 -TargetBuild $(TargetBuild) -IsNetCore:$$(NetCore) -BuildConfig $(Configuration) -Scope $(Scope) -ApiKey $(NuGetKey) -RepositoryLocation /&quot;$(NuGetPublishingSource)/&quot;&quot; -NugetExe $(NuGetCommand)" />
260-
</Target>
261-
262-
<Target Name="BuildInstaller" AfterTargets="Publish" Condition="('$(Scope)' == 'All' or '$(Scope)' == 'Latest' or '$(Scope)' == 'Netcore')">
263-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. Register-PSRepository -Name MSIcreationrepository -SourceLocation $(RepoArtifacts) -InstallationPolicy Trusted &quot;" />
264-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoRoot)/setup/generate.ps1 -repository MSIcreationrepository &quot;" />
265-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. Unregister-PSRepository -Name MSIcreationrepository &quot;" />
259+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoTools)PublishModules.ps1 -TargetBuild $(TargetBuild) -IsNetCore:$$(NetCore) -BuildConfig $(Configuration) -Scope $(Scope) -ApiKey $(NuGetKey) -RepositoryLocation &quot;$(NuGetPublishingSource)&quot;&quot; -NugetExe $(NuGetCommand)" />
266260
</Target>
267261

268262
<Target Name="BuildImages">

tools/PublishModules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if ($PublishLocal) {
109109
$null = New-Item -ItemType Directory -Force -Path $tempRepoPath
110110
$tempRepoName = ([System.Guid]::NewGuid()).ToString()
111111
$repo = Get-PSRepository | Where-Object { $_.SourceLocation -eq $tempRepoPath }
112-
if ($repo -ne $null) {
112+
if ($null -ne $repo) {
113113
$tempRepoName = $repo.Name
114114
} else {
115115
Register-PSRepository -Name $tempRepoName -SourceLocation $tempRepoPath -PublishLocation $tempRepoPath -InstallationPolicy Trusted -PackageManagementProvider NuGet

tools/PublishModules.psm1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,21 +275,20 @@ function Get-AllModules {
275275
)
276276
Write-Host "Getting Azure client modules"
277277
$clientModules = Get-ClientModules -BuildConfig $BuildConfig -Scope $Scope -PublishLocal:$PublishLocal -IsNetCore:$isNetCore
278-
Write-Host " "
279-
280-
if($clientModules.Length -le 2 -and $TargetBuild -eq "true") {
278+
Write-Host "$clientModules"
279+
if($clientModules.Count -le 2 -and $TargetBuild -eq "true") {
281280
return @{
282281
ClientModules = $clientModules
283282
}
284283
}
285284

286285
Write-Host "Getting admin modules"
287286
$adminModules = Get-AdminModules -BuildConfig $BuildConfig -Scope $Scope
288-
Write-Host " "
287+
Write-Host "$adminModules"
289288

290289
Write-Host "Getting rollup modules"
291290
$rollupModules = Get-RollupModules -BuildConfig $BuildConfig -Scope $Scope -IsNetCore:$isNetCore
292-
Write-Host " "
291+
Write-Host "$rollupModules"
293292

294293
return @{
295294
ClientModules = $clientModules;
@@ -592,6 +591,9 @@ function Add-AllModules {
592591
foreach ($package in $packages) {
593592
$fileName = $package.Name
594593
$versionString = $fileName.Replace('Az.Accounts.', '').Replace('.nupkg', '')
594+
if ($versionString -match 'preview') {
595+
return
596+
}
595597
$version = [version]$versionString
596598

597599
if ($version -gt $latestVersion) {

0 commit comments

Comments
 (0)