You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
[CmdletBinding()]
|
|
|
|
param ()
|
|
|
|
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
|
|
|
# Requires: dotnet tool install --global GitVersion.Tool
|
|
|
|
$version = dotnet-gitversion /showvariable SemVer
|
|
|
|
|
|
|
|
# Requires: Install-Module -Name ChangelogManagement
|
|
|
|
Update-Changelog -ReleaseVersion $version -LinkMode Automatic -LinkPattern @{
|
|
|
|
FirstRelease = "https://github.com/rcdailey/trash-updater/releases/tag/v{CUR}"
|
|
|
|
NormalRelease = "https://github.com/rcdailey/trash-updater/compare/v{PREV}...v{CUR}"
|
|
|
|
Unreleased = "https://github.com/rcdailey/trash-updater/compare/v{CUR}...HEAD"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Read & Write the file after updating the changelog to force a newline at the end of the file. The
|
|
|
|
# Update-Changelog method removes the newline at the end.
|
|
|
|
$content = Get-Content -Path .\CHANGELOG.md
|
|
|
|
Set-Content -Path .\CHANGELOG.md -Value $content
|
|
|
|
|
|
|
|
git commit -m "release: v$version" -- CHANGELOG.md
|
|
|
|
git tag -m "release v$version" "v$version"
|