Skip to content

Commit a286861

Browse files
authored
Update apiview artifact search to account for the new artifact taxonomy (Azure#16887)
* update apiview artifact search to account for the new artifact taxonomy
1 parent f5217fa commit a286861

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

eng/pipelines/templates/stages/archetype-python-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ stages:
292292
exit 0
293293
}
294294
295-
twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*a*.whl
295+
twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*-*a*.whl
296296
echo "Uploaded whl to devops feed $(DevFeedName)"
297-
twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*a*.zip
297+
twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$(Package.Name)/*-*a*.zip
298298
echo "Uploaded sdist to devops feed $(DevFeedName)"
299299
displayName: 'Publish ${{artifact.name}} alpha package'

eng/scripts/Language-Settings.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,18 @@ function Find-python-Artifacts-For-Apireview($artifactDir, $artifactName)
225225
return $null
226226
}
227227

228-
$packageName = $artifactName + "-"
229-
Write-Host "Searching for $($packageName) wheel in artifact path $($artifactDir)"
230-
$files = Get-ChildItem "${artifactDir}" | Where-Object -FilterScript {$_.Name.StartsWith($packageName) -and $_.Name.EndsWith(".whl")}
228+
$whlDirectory = (Join-Path -Path $artifactDir -ChildPath $artifactName.Replace("_","-"))
229+
230+
Write-Host "Searching for $($artifactName) wheel in artifact path $($whlDirectory)"
231+
$files = Get-ChildItem $whlDirectory | ? {$_.Name.EndsWith(".whl")}
231232
if (!$files)
232233
{
233-
Write-Host "$($artifactDir) does not have wheel package for $($packageName)"
234+
Write-Host "$whlDirectory does not have wheel package for $($artifactName)"
234235
return $null
235236
}
236237
elseif($files.Count -ne 1)
237238
{
238-
Write-Host "$($artifactDir) should contain only one published wheel package for $($packageName)"
239+
Write-Host "$whlDirectory should contain only one published wheel package for $($artifactName)"
239240
Write-Host "No of Packages $($files.Count)"
240241
return $null
241242
}

0 commit comments

Comments
 (0)