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
8 changes: 5 additions & 3 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ function Get-GoModuleVersionInfo($modPath)
function Get-GoModuleProperties($goModPath)
{
$goModPath = $goModPath -replace "\\", "/"
if ($goModPath -match "(?<modPath>sdk/(?<serviceDir>(resourcemanager/)?([^/]+/)?(?<modName>[^/]+$)))")
# We should keep this regex in sync with what is in the azure-sdk repo at https://github.com/Azure/azure-sdk/blob/main/eng/scripts/Query-Azure-Packages.ps1#L227
# The serviceName named capture group is unused but used in azure-sdk, so it's kept here for parity
if ($goModPath -match "(?<modPath>sdk/(?<serviceDir>(.*?(?<serviceName>[^/]+)/)?(?<modName>[^/]+$)))")
{
$modPath = $matches["modPath"]
$modName = $matches["modName"] # We may need to start readong this from the go.mod file if the path and mod config start to differ
$modName = $matches["modName"] # We may need to start reading this from the go.mod file if the path and mod config start to differ
$serviceDir = $matches["serviceDir"]
$sdkType = "client"
if ($modName.StartsWith("arm") -or $modPath.Contains("resourcemanager")) { $sdkType = "mgmt" }
Expand Down Expand Up @@ -143,4 +145,4 @@ function Find-Go-Artifacts-For-Apireview($ArtifactPath, $PackageName)
return $packages
}
return $null
}
}