Release-Skript: letzten Tag ohne stderr-Ausgabe ermitteln
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
8817ada3c4
commit
464825265e
1 file changed
+4
-3
+4
-3
@@ -128,15 +128,16 @@ function Set-ProjectVersion([string]$New) {
|
||||
function Undo-VersionChange {
|
||||
if ($script:Bumped -and -not $script:Committed) {
|
||||
Write-Info 'Versionsänderung wird zurückgenommen ...'
|
||||
& git checkout -- @VersionFiles 2>$null | Out-Null
|
||||
& git checkout -- @VersionFiles | Out-Null
|
||||
$script:Bumped = $false
|
||||
}
|
||||
}
|
||||
|
||||
function Get-ReleaseNotes([string]$NewVersion) {
|
||||
$lastTag = $null
|
||||
$found = & git describe --tags --abbrev=0 --match 'v*' 2>$null
|
||||
if ($LASTEXITCODE -eq 0 -and $found) { $lastTag = [string]$found }
|
||||
$tags = & git tag --list 'v*' --sort=-version:refname
|
||||
if ($LASTEXITCODE -ne 0) { throw 'git tag ist fehlgeschlagen.' }
|
||||
if ($tags) { $lastTag = [string]($tags | Select-Object -First 1) }
|
||||
$range = 'HEAD'
|
||||
if ($lastTag) { $range = "$lastTag..HEAD" }
|
||||
$lines = & git -c core.quotepath=off log $range --no-merges --pretty=format:'- %s (%h)' --grep='^Release v' --invert-grep
|
||||
|
||||
Reference in new issue
Block a user