Skip to content

Commit

Permalink
Update apiview artifact search to account for the new artifact taxono…
Browse files Browse the repository at this point in the history
…my (#16887)

* update apiview artifact search to account for the new artifact taxonomy
  • Loading branch information
scbedd authored Feb 23, 2021
1 parent f5217fa commit a286861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions eng/pipelines/templates/stages/archetype-python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
11 changes: 6 additions & 5 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a286861

Please sign in to comment.