Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions update/bump-version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ function update_changelog {
$fileContent = Get-Content -Path "CHANGELOG.md" -Raw -Encoding UTF8;
$contentAdd = "<a name=`"$new_tag`"></a>`n" ;
$contentAdd += "## [$new_tag](https://github.com/rime/weasel/compare/$old_tag...$new_tag)($currentDateTime)`n" ;
# if $new_tag.txt exists, add the content to changelog
$new_tag_file = "$new_tag.txt";
if (Test-Path -Path $new_tag_file) {
$new_tag_content = Get-Content -Path $new_tag_file -Raw -Encoding UTF8;
$contentAdd += "`n" + $new_tag_content + "`n";
}

$contentAdd += $changelog;
Write-Host "`n" + $contentAdd + "`n"
$fileContent = $contentAdd + "`n" + $fileContent;
Expand Down
6 changes: 6 additions & 0 deletions update/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ update_changelog() {
local contentAdd
contentAdd="<a name=\"$new_tag\"></a>"$'\n'
contentAdd+="## [$new_tag](https://github.com/rime/weasel/compare/$old_tag...$new_tag)($currentDateTime)"$'\n'
# if $new_tag.txt exists, add the content to changelog
if [[ -f "$new_tag.txt" ]]; then
contentAdd+=$'\n'
contentAdd+=$(<"$new_tag.txt")
contentAdd+=$'\n'
fi
contentAdd+="$changelog"
contentAdd=$"$contentAdd"$'\n'

Expand Down
Loading