Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools repository for Tools P…
Browse files Browse the repository at this point in the history
…R 965
  • Loading branch information
azure-sdk committed Sep 4, 2020
1 parent d32c763 commit 7f18a68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 9 additions & 4 deletions eng/common/Update-Change-Log.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ param (
[Parameter(Mandatory = $true)]
[String]$ChangeLogPath,
[String]$Unreleased = $True,
[String]$ReplaceVersion = $False
[String]$ReplaceVersion = $False,
[String]$ReleaseDate
)


Expand Down Expand Up @@ -46,8 +47,12 @@ function Get-VersionTitle($Version, $Unreleased)
# Generate version title
$newVersionTitle = "## $Version $UNRELEASED_TAG"
if ($Unreleased -eq $False) {
$releaseDate = Get-Date -Format "(yyyy-MM-dd)"
$newVersionTitle = "## $Version $releaseDate"
$actualReleaseDate = $ReleaseDate;

if (!$actualReleaseDate) {
$actualReleaseDate = Get-Date -Format "yyyy-MM-dd"
}
$newVersionTitle = "## $Version ($actualReleaseDate)"
}
return $newVersionTitle
}
Expand Down Expand Up @@ -95,7 +100,7 @@ function Get-NewChangeLog( [System.Collections.ArrayList]$ChangelogLines, $Versi
exit(0)
}

if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG))) {
if (($ReplaceVersion -eq $True) -and ($Unreleased -eq $False) -and $CurrentTitle.Contains($version) -and (-not $CurrentTitle.Contains($UNRELEASED_TAG)) -and (-not $ReleaseDate)) {
Write-Host "Version is already present in change log with a release date."
exit(0)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ parameters:
TargetDocRepoOwner: ''
PRBranchName: 'smoke-test-rdme'
SourceBranchName: 'smoke-test'
PRLabels: 'automation'
ArtifactName: ''
Language: ''
DocRepoDestinationPath: '' #usually docs-ref-services/
Expand Down Expand Up @@ -81,6 +82,7 @@ steps:
ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }}
GHReviewersVariable: ${{ parameters.GHReviewersVariable }}
GHTeamReviewersVariable: ${{ parameters.GHTeamReviewersVariable }}
PRLabels: ${{ parameters.PRLabels }}

- ${{if ne( parameters['OnboardingBranch'], '')}}:
- pwsh: |
Expand Down

0 comments on commit 7f18a68

Please sign in to comment.