Skip to content

Commit

Permalink
appropriately update the updatedocsciFn in Language-Settings. It woul…
Browse files Browse the repository at this point in the history
…d only update an EXISTING package w/ the appropriate version target for Preview. (Azure#17220)
  • Loading branch information
scbedd authored Mar 10, 2021
1 parent dd06313 commit 16de2d8
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,25 @@ function Update-python-CIConfig($pkgs, $ciRepo, $locationInDocRepo, $monikerId=$
$existingPackageDef.package_info.version = ">=$($releasingPkg.PackageVersion)"
}
else {
if ($def.version) {
$def.PSObject.Properties.Remove('version')
if ($existingPackageDef.package_info.version) {
$existingPackageDef.package_info.PSObject.Properties.Remove('version')
}
}
}
else {
$newItem = New-Object PSObject -Property @{
package_info = New-Object PSObject -Property @{
prefer_source_distribution = "true"
install_type = "pypi"
name=$releasingPkg.PackageId
}
exclude_path = @("test*","example*","sample*","doc*")
package_info = New-Object PSObject -Property @{
prefer_source_distribution = "true"
install_type = "pypi"
name=$releasingPkg.PackageId
}
exclude_path = @("test*","example*","sample*","doc*")
}

if ($releasingPkg.IsPrerelease) {
$newItem.package_info | Add-Member -NotePropertyName version -NotePropertyValue ">=$($releasingPkg.PackageVersion)"
}

$allJson.packages += $newItem
}
}
Expand Down

0 comments on commit 16de2d8

Please sign in to comment.