Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
$Language = "dotnet"
$Lang = "net"
$LanguageShort = "net"
$PackageRepository = "Nuget"
$packagePattern = "*.nupkg"
$MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/dotnet-packages.csv"

function Extract-dotnet-PkgProperties ($pkgPath, $serviceName, $pkgName)
function Get-dotnet-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName)
{
$projectPath = Join-Path $pkgPath "src" "$pkgName.csproj"
if (Test-Path $projectPath)
{
$projectData = New-Object -TypeName XML
$projectData.load($projectPath)
$pkgVersion = Select-XML -Xml $projectData -XPath '/Project/PropertyGroup/Version'
return [PackageProps]::new($pkgName, $pkgVersion, $pkgPath, $serviceName)
return [PackageProps]::new($pkgName, $pkgVersion, $pkgPath, $serviceDirectory)
}
else
{
Expand All @@ -21,13 +21,13 @@ function Extract-dotnet-PkgProperties ($pkgPath, $serviceName, $pkgName)
}

# Returns the nuget publish status of a package id and version.
function IsNugetPackageVersionPublished($pkgId, $pkgVersion)
function IsNugetPackageVersionPublished ($pkgId, $pkgVersion)
{
$nugetUri = "https://api.nuget.org/v3-flatcontainer/$($pkgId.ToLowerInvariant())/index.json"

try
{
$nugetVersions = Invoke-RestMethod -MaximumRetryCount 3 -uri $nugetUri -Method "GET"
$nugetVersions = Invoke-RestMethod -MaximumRetryCount 3 -RetryIntervalSec 10 -uri $nugetUri -Method "GET"
return $nugetVersions.versions.Contains($pkgVersion)
}
catch
Expand All @@ -48,7 +48,7 @@ function IsNugetPackageVersionPublished($pkgId, $pkgVersion)
}

# Parse out package publishing information given a nupkg ZIP format.
function Parse-dotnet-Package($pkg, $workingDirectory)
function Get-dotnet-PackageInfoFromPackageFile ($pkg, $workingDirectory)
{
$workFolder = "$workingDirectory$($pkg.Basename)"
$origFolder = Get-Location
Expand Down Expand Up @@ -88,7 +88,7 @@ function Parse-dotnet-Package($pkg, $workingDirectory)
}

# Stage and Upload Docs to blob Storage
function StageAndUpload-dotnet-Docs ()
function Publish-dotnet-GithubIODocs ()
{
$PublishedPkgs = Get-ChildItem "$($DocLocation)/packages" | Where-Object -FilterScript {$_.Name.EndsWith(".nupkg") -and -not $_.Name.EndsWith(".symbols.nupkg")}
$PublishedDocs = Get-ChildItem "$($DocLocation)" | Where-Object -FilterScript {$_.Name.StartsWith("Docs.")}
Expand Down