Skip to content

Commit 493594b

Browse files
Update update changelog (Azure#17788)
* Add function to retrieve package versions from nuget * Add SetPackageVersion function, update call to Update-ChangeLog.ps1 * Add GetPackageInstallNotes functions * Add GeneralReleaseNotesParser.ps1 script * Remove changes not related to changelog
1 parent cdd844a commit 493594b

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ function Publish-dotnet-GithubIODocs ($DocLocation, $PublicArtifactLocation)
142142
Upload-Blobs -DocDir "$($DocsStagingDir)" -PkgName $pkgProperties.PackageId -DocVersion $pkgProperties.PackageVersion -ReleaseTag $pkgProperties.ReleaseTag
143143
}
144144

145-
function Get-dotnet-GithubIoDocIndex() {
145+
function Get-dotnet-GithubIoDocIndex()
146+
{
146147
# Update the main.js and docfx.json language content
147148
UpdateDocIndexFiles -appTitleLang ".NET"
148149
# Fetch out all package metadata from csv file.
@@ -157,7 +158,8 @@ function Get-dotnet-GithubIoDocIndex() {
157158

158159
# details on CSV schema can be found here
159160
# https://review.docs.microsoft.com/en-us/help/onboard/admin/reference/dotnet/documenting-nuget?branch=master#set-up-the-ci-job
160-
function Update-dotnet-CIConfig($pkgs, $ciRepo, $locationInDocRepo, $monikerId=$null){
161+
function Update-dotnet-CIConfig($pkgs, $ciRepo, $locationInDocRepo, $monikerId=$null)
162+
{
161163
$csvLoc = (Join-Path -Path $ciRepo -ChildPath $locationInDocRepo)
162164

163165
if (-not (Test-Path $csvLoc)) {
@@ -198,7 +200,6 @@ function Update-dotnet-CIConfig($pkgs, $ciRepo, $locationInDocRepo, $monikerId=$
198200
Set-Content -Path $csvLoc -Value $allCSVRows
199201
}
200202

201-
202203
# function is used to auto generate API View
203204
function Find-dotnet-Artifacts-For-Apireview($artifactDir, $packageName = "")
204205
{
@@ -212,3 +213,13 @@ function Find-dotnet-Artifacts-For-Apireview($artifactDir, $packageName = "")
212213
$packages = @{ $pkg.Name = $pkg.FullName }
213214
return $packages
214215
}
216+
217+
function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseDate, $BuildType=$null, $GroupId=$null)
218+
{
219+
if($null -eq $ReleaseDate)
220+
{
221+
$ReleaseDate = Get-Date -Format "yyyy-MM-dd"
222+
}
223+
& "$EngDir/scripts/Update-PkgVersion.ps1" -ServiceDirectory $ServiceDirectory -PackageName $PackageName `
224+
-NewVersionString $Version -ReleaseDate $ReleaseDate
225+
}

eng/scripts/Update-PkgVersion.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@ Write-Host "Current Version: ${PackageVersion}"
6767
if ([System.String]::IsNullOrEmpty($NewVersionString)) {
6868
$packageSemVer.IncrementAndSetToPrerelease()
6969

70-
& "${PSScriptRoot}/../common/Update-Change-Log.ps1" -Version $packageSemVer.ToString() -ChangeLogPath $changeLogPath -Unreleased $true
70+
& "${PSScriptRoot}/../common/scripts/Update-ChangeLog.ps1" -Version $packageSemVer.ToString() `
71+
-ServiceDirectory $ServiceDirectory -PackageName $PackageName -Unreleased $True
7172
}
7273
else {
7374
$packageSemVer = [AzureEngSemanticVersion]::new($NewVersionString)
7475

75-
& "${PSScriptRoot}/../common/Update-Change-Log.ps1" -Version $packageSemVer.ToString() -ChangeLogPath $changeLogPath -Unreleased $false -ReplaceVersion $true -ReleaseDate $ReleaseDate
76+
& "${PSScriptRoot}/../common/scripts/Update-ChangeLog.ps1" -Version $packageSemVer.ToString() `
77+
-ServiceDirectory $ServiceDirectory -PackageName $PackageName -Unreleased $False `
78+
-ReplaceLatestEntryTitle $True -ReleaseDate $ReleaseDate
7679
}
7780

7881
Write-Host "New Version: ${packageSemVer}"

0 commit comments

Comments
 (0)