diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 7540e4bba413..ba80cecf9a23 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -292,8 +292,8 @@ stages: exit 0 } - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*a*.whl + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*-*a*.whl echo "Uploaded whl to devops feed $(DevFeedName)" - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*a*.zip + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*-*a*.zip echo "Uploaded sdist to devops feed $(DevFeedName)" displayName: 'Publish ${{artifact.name}} alpha package' diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 755894e0b8e6..5b7044afee3e 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -225,17 +225,18 @@ function Find-python-Artifacts-For-Apireview($artifactDir, $artifactName) return $null } - $packageName = $artifactName + "-" - Write-Host "Searching for $($packageName) wheel in artifact path $($artifactDir)" - $files = Get-ChildItem "${artifactDir}" | Where-Object -FilterScript {$_.Name.StartsWith($packageName) -and $_.Name.EndsWith(".whl")} + $whlDirectory = (Join-Path -Path $artifactDir -ChildPath $artifactName.Replace("_","-")) + + Write-Host "Searching for $($artifactName) wheel in artifact path $($whlDirectory)" + $files = Get-ChildItem $whlDirectory | ? {$_.Name.EndsWith(".whl")} if (!$files) { - Write-Host "$($artifactDir) does not have wheel package for $($packageName)" + Write-Host "$whlDirectory does not have wheel package for $($artifactName)" return $null } elseif($files.Count -ne 1) { - Write-Host "$($artifactDir) should contain only one published wheel package for $($packageName)" + Write-Host "$whlDirectory should contain only one published wheel package for $($artifactName)" Write-Host "No of Packages $($files.Count)" return $null }