Make Service Directory consistent
@@ -29,11 +29,12 @@ function Get-GoModuleVersionInfo($modPath)
function Get-GoModuleProperties($goModPath)
{
- if ($goModPath -match "(?<modPath>sdk[\\/](resourcemanager[\\/])?(?:(?<modGroup>[^\\/]+)[\\/])?(?<modName>[^\\/]+$))")
+ $goModPath = $goModPath -replace "\\", "/"
+ if ($goModPath -match "(?<modPath>sdk/(?<serviceDir>(resourcemanager/)?([^/]+/)?(?<modName>[^/]+$)))")
{
- $modPath = $matches["modPath"] -replace "\\", "/"
+ $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
- $modGroup = $matches["modGroup"]
+ $serviceDir = $matches["serviceDir"]
$sdkType = "client"
if ($modName.StartsWith("arm")) { $sdkType = "mgmt" }
@@ -43,7 +44,7 @@ function Get-GoModuleProperties($goModPath)
return $null
}
- $pkgProp = [PackageProps]::new($modPath, $modVersion, $goModPath, $modGroup)
+ $pkgProp = [PackageProps]::new($modPath, $modVersion, $goModPath, $serviceDir)
$pkgProp.IsNewSdk = $true
$pkgProp.SdkType = $sdkType
