forked from EternalBox/EternalJukebox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.ps1
More file actions
27 lines (21 loc) · 740 Bytes
/
release.ps1
File metadata and controls
27 lines (21 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Adapted from https://github.com/orhun/git-cliff/blob/main/release.sh
param(
[Parameter(Mandatory = $True)]
$VersionTag
)
Write-Host "Preparing $VersionTag"
try
{
git cliff --config cliff.toml --tag "$VersionTag" -o CHANGELOG.md
git add CHANGELOG.md
git commit -m "chore(release): prepare for $VersionTag"
$changelog = (git cliff --config release_tag.toml --unreleased --strip all) -join "`n"
git tag -a "$VersionTag" -m "Release $VersionTag" -m "$changelog"
git tag -v "$VersionTag"
Write-Host "Done!"
Write-Host "Now push the commit (git push) and the tag (git push --tags)."
}
catch
{
Write-Error "Failed to generate CHANGELOG.md; is `git cliff` installed? (cargo binstall git-cliff)"
}