forked from gui-cs/Terminal.Gui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRelease.ps1
32 lines (25 loc) · 783 Bytes
/
Release.ps1
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
28
29
30
31
32
# Script for doing a Release of Terminal.Gui
# For now just does Alpha
param(
[Parameter(Mandatory=$true)]
[int]$Version
)
$branch = "v2_release"
$tag = "$Version-prealpha"
$releaseMessage = "Release $tag"
try {
Write-Host "Switching to branch $branch"
git checkout $branch
Write-Host "Pulling latest from upstream branch $branch"
git pull upstream $branch
Write-Host "Tagging release with tag $tag"
git tag $tag -a -m $releaseMessage
Write-Host "Creating empty commit with message $releaseMessage"
git commit --allow-empty -m $releaseMessage
Write-Host "Pushing changes to upstream"
git push --atomic upstream $branch $tag
} catch {
Write-Host "An error occurred: $_"
exit 1
}
Write-Host "Script executed successfully"