From c94bec082c9fb5cb622dae6b8dacc0a986d0fa76 Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Sun, 28 Jul 2024 14:02:11 +0000 Subject: [PATCH] Refactor (generate): Standardize ref parameter for generate functions --- .../Public/Generate-ReleaseNotes.ps1 | 4 ++-- .../generate/variants/Changes-HashSubject-Merges.ps1 | 6 +++--- .../variants/Changes-HashSubject-NoMerges-Categorized.ps1 | 6 +++--- .../Changes-HashSubject-NoMerges-CategorizedSorted.ps1 | 6 +++--- .../generate/variants/Changes-HashSubject-NoMerges.ps1 | 6 +++--- .../generate/variants/Changes-HashSubject.ps1 | 6 +++--- .../Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 | 6 +++--- ...anges-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 | 6 +++--- .../generate/variants/VersionDate-HashSubject-Merges.ps1 | 8 ++++---- .../VersionDate-HashSubject-NoMerges-Categorized.ps1 | 8 ++++---- ...VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 | 8 ++++---- .../variants/VersionDate-HashSubject-NoMerges.ps1 | 8 ++++---- .../generate/variants/VersionDate-HashSubject.ps1 | 8 ++++---- ...VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 | 8 ++++---- ...nDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 | 8 ++++---- .../generate/variants/VersionDate-Subject-Merges.ps1 | 8 ++++---- .../variants/VersionDate-Subject-NoMerges-Categorized.ps1 | 8 ++++---- .../VersionDate-Subject-NoMerges-CategorizedSorted.ps1 | 8 ++++---- .../generate/variants/VersionDate-Subject-NoMerges.ps1 | 8 ++++---- .../generate/variants/VersionDate-Subject.ps1 | 8 ++++---- .../VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 | 8 ++++---- ...rsionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 | 8 ++++---- src/scripts/ci/Invoke-Generate.ps1 | 2 +- 23 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/PSRepositoryReleaseManager/Public/Generate-ReleaseNotes.ps1 b/src/PSRepositoryReleaseManager/Public/Generate-ReleaseNotes.ps1 index 7194980..0f1c0af 100644 --- a/src/PSRepositoryReleaseManager/Public/Generate-ReleaseNotes.ps1 +++ b/src/PSRepositoryReleaseManager/Public/Generate-ReleaseNotes.ps1 @@ -8,7 +8,7 @@ function Generate-ReleaseNotes { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref , [Parameter(Mandatory=$true)] [ValidateSet( @@ -44,7 +44,7 @@ function Generate-ReleaseNotes { try { $private:generateArgs = @{ Path = $Path - TagName = $TagName + Ref = $Ref } "Generating release notes of variant '$($Variant)'" | Write-Verbose $releaseNotesContent = & $Variant @private:generateArgs -ErrorAction Stop diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-Merges.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-Merges.ps1 index a5f476f..43a244d 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-Merges.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-Merges.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubject-Merges { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' Merges = $true } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 index 3471b1e..884f066 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubject-NoMerges-Categorized { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' NoMerges = $true } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 index 68cdf8b..b2ca757 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubject-NoMerges-CategorizedSorted { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' NoMerges = $true } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges.ps1 index 1f5fa33..bd72e94 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubject-NoMerges { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' NoMerges = $true } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject.ps1 index a4a9f2a..8a7b9f2 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubject { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' } if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 index 51bf88f..5c056ba 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s - `%aN`' NoMerges = $true } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 index 8ef372a..e7717ab 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -7,16 +7,16 @@ function Changes-HashSubjectAuthor-NoMerges-CategorizedSorted { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s - `%aN`' NoMerges = $true } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-Merges.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-Merges.ps1 index 80a24d2..ad5bd31 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-Merges.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-Merges.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubject-Merges { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' Merges = $true } @@ -25,7 +25,7 @@ function VersionDate-HashSubject-Merges { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ $commitHistoryCollection | % { diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 index a10e628..7c7f2c8 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubject-NoMerges-Categorized { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' NoMerges = $true } @@ -120,7 +120,7 @@ function VersionDate-HashSubject-NoMerges-Categorized { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 index 59ad001..e2b81c3 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' NoMerges = $true } @@ -138,7 +138,7 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges.ps1 index 62cfd35..9ac1ada 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubject-NoMerges { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' NoMerges = $true } @@ -25,7 +25,7 @@ function VersionDate-HashSubject-NoMerges { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ $commitHistoryCollection | % { diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject.ps1 index 8269257..ee79c6c 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubject { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s' } if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } @@ -24,7 +24,7 @@ function VersionDate-HashSubject { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ $commitHistoryCollection | % { diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 index 2f55891..de2d3d6 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s - `%aN`' NoMerges = $true } @@ -120,7 +120,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 index 4354ec8..e9399b4 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -7,16 +7,16 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%h %s - `%aN`' NoMerges = $true } @@ -140,7 +140,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-Merges.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-Merges.ps1 index 3ba2d04..27269fd 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-Merges.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-Merges.ps1 @@ -7,16 +7,16 @@ function VersionDate-Subject-Merges { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s' Merges = $true } @@ -25,7 +25,7 @@ function VersionDate-Subject-Merges { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ $commitHistoryCollection | % { diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 index 1e04b84..16d6c46 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 @@ -7,16 +7,16 @@ function VersionDate-Subject-NoMerges-Categorized { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s' NoMerges = $true } @@ -120,7 +120,7 @@ function VersionDate-Subject-NoMerges-Categorized { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 index 9456e6a..2df558a 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 @@ -7,16 +7,16 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s' NoMerges = $true } @@ -136,7 +136,7 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges.ps1 index dfe0797..97ea905 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges.ps1 @@ -7,16 +7,16 @@ function VersionDate-Subject-NoMerges { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s' NoMerges = $true } @@ -25,7 +25,7 @@ function VersionDate-Subject-NoMerges { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ $commitHistoryCollection | % { diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject.ps1 index 2f3cafe..773ae96 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject.ps1 @@ -7,16 +7,16 @@ function VersionDate-Subject { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s' } if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } @@ -24,7 +24,7 @@ function VersionDate-Subject { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ $commitHistoryCollection | % { diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 index 97bf8b6..fdaa5ba 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 @@ -7,16 +7,16 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s - `%aN`' NoMerges = $true } @@ -120,7 +120,7 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 index d487412..6244961 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -7,16 +7,16 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { , [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] - [string]$TagName + [string]$Ref ) $ErrorActionPreference = 'Stop' try { - $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $TagName -ErrorAction SilentlyContinue + $previousRelease = Get-RepositoryReleasePrevious -Path $Path -Ref $Ref -ErrorAction SilentlyContinue $funcArgs = @{ Path = $Path - FirstRef = $TagName + FirstRef = $Ref PrettyFormat = '%s - `%aN`' NoMerges = $true } @@ -138,7 +138,7 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { } $releaseBody = & { @" -## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) +## $Ref ($(Get-Date -UFormat '%Y-%m-%d')) "@ foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false diff --git a/src/scripts/ci/Invoke-Generate.ps1 b/src/scripts/ci/Invoke-Generate.ps1 index 08dfc8d..e900f4e 100644 --- a/src/scripts/ci/Invoke-Generate.ps1 +++ b/src/scripts/ci/Invoke-Generate.ps1 @@ -25,7 +25,7 @@ try { } $private:generateArgs = @{ Path = $private:ProjectDir - TagName = if ($env:RELEASE_TAG_REF) { + Ref = if ($env:RELEASE_TAG_REF) { "Using specified ref '$env:RELEASE_TAG_REF'" | Write-Verbose $env:RELEASE_TAG_REF }else {