Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Language Settings File #13389

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
$Language = "python"
$Lang = "python"
$PackageRepository = "PyPI"
$packagePattern = "*.zip"
$MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/python-packages.csv"

function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
function Get-python-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName)
chidozieononiwu marked this conversation as resolved.
Show resolved Hide resolved
{
$pkgName = $pkgName.Replace('_', '-')
if (Test-Path (Join-Path $pkgPath "setup.py"))
Expand All @@ -15,7 +14,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
popd
if (($setupProps -ne $null) -and ($setupProps[0] -eq $pkgName))
{
return [PackageProps]::new($setupProps[0], $setupProps[1], $pkgPath, $serviceName)
return [PackageProps]::new($setupProps[0], $setupProps[1], $pkgPath, $serviceDirectory)
}
}
return $null
Expand All @@ -25,7 +24,7 @@ function Extract-python-PkgProperties ($pkgPath, $serviceName, $pkgName)
function IsPythonPackageVersionPublished($pkgId, $pkgVersion) {
try
{
$existingVersion = (Invoke-RestMethod -MaximumRetryCount 3 -Method "Get" -uri "https://pypi.org/pypi/$pkgId/$pkgVersion/json").info.version
$existingVersion = (Invoke-RestMethod -MaximumRetryCount 3 -RetryIntervalSec 10 -Method "Get" -uri "https://pypi.org/pypi/$pkgId/$pkgVersion/json").info.version
# if existingVersion exists, then it's already been published
return $True
}
Expand All @@ -47,7 +46,7 @@ function IsPythonPackageVersionPublished($pkgId, $pkgVersion) {
}

# Parse out package publishing information given a python sdist of ZIP format.
function Parse-python-Package($pkg, $workingDirectory) {
function Get-python-PackageInfoFromPackageFile ($pkg, $workingDirectory) {
$pkg.Basename -match $SDIST_PACKAGE_REGEX | Out-Null

$pkgId = $matches["package"]
Expand Down Expand Up @@ -84,7 +83,7 @@ function Parse-python-Package($pkg, $workingDirectory) {
}

# Stage and Upload Docs to blob Storage
function StageAndUpload-python-Docs()
function Publish-python-GithubIODocs ()
{
$PublishedDocs = Get-ChildItem "$DocLocation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")}

Expand Down