From 7d08abf3802ef4e3f329d3cda3eef7016001bf40 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 28 Jan 2021 10:50:13 -0800 Subject: [PATCH 1/3] Normalize the package name for Doc.Ms readme --- eng/scripts/Language-Settings.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index f64e91e56f57f..4eec1a0adbe61 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -223,4 +223,9 @@ function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseD } & "$EngDir/scripts/Update-PkgVersion.ps1" -ServiceDirectory $ServiceDirectory -PackageName $PackageName ` -NewVersionString $Version -ReleaseDate $ReleaseDate +} + +# Turn the package name start with `Azure.Identity` to "Identity". +function Normalize-dotnet-Package-name ($PackageName) { + return $PackageName -replace "Azure." , "" } \ No newline at end of file From 5e2b869af9b9af3452a5251793c0d9f0a066a3bf Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Mon, 1 Feb 2021 14:28:01 -0800 Subject: [PATCH 2/3] Put the regex in get-packageInfoFromPackageFile --- eng/scripts/Language-Settings.ps1 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 4eec1a0adbe61..7620e7f58da3e 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -64,6 +64,7 @@ function Get-dotnet-PackageInfoFromPackageFile ($pkg, $workingDirectory) Expand-Archive -Path $zipFileLocation -DestinationPath $workFolder [xml] $packageXML = Get-ChildItem -Path "$workFolder/*.nuspec" | Get-Content $pkgId = $packageXML.package.metadata.id + $docsReadMeName = $pkgId -replace "Azure." , "" $pkgVersion = $packageXML.package.metadata.version $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0] @@ -87,6 +88,7 @@ function Get-dotnet-PackageInfoFromPackageFile ($pkg, $workingDirectory) Deployable = $forceCreate -or !(IsNugetPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion) ReleaseNotes = $releaseNotes ReadmeContent = $readmeContent + DocsReadMeName = $docsReadMeName } } @@ -224,8 +226,3 @@ function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseD & "$EngDir/scripts/Update-PkgVersion.ps1" -ServiceDirectory $ServiceDirectory -PackageName $PackageName ` -NewVersionString $Version -ReleaseDate $ReleaseDate } - -# Turn the package name start with `Azure.Identity` to "Identity". -function Normalize-dotnet-Package-name ($PackageName) { - return $PackageName -replace "Azure." , "" -} \ No newline at end of file From bfd59abb2cde14502a59949ab07902ddad364947 Mon Sep 17 00:00:00 2001 From: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Mon, 1 Feb 2021 17:09:09 -0800 Subject: [PATCH 3/3] Update eng/scripts/Language-Settings.ps1 Co-authored-by: Wes Haggard --- eng/scripts/Language-Settings.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index b904cad7e0e74..8b991880e2e45 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -64,7 +64,7 @@ function Get-dotnet-PackageInfoFromPackageFile ($pkg, $workingDirectory) Expand-Archive -Path $zipFileLocation -DestinationPath $workFolder [xml] $packageXML = Get-ChildItem -Path "$workFolder/*.nuspec" | Get-Content $pkgId = $packageXML.package.metadata.id - $docsReadMeName = $pkgId -replace "Azure." , "" + $docsReadMeName = $pkgId -replace "^Azure." , "" $pkgVersion = $packageXML.package.metadata.version $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]