-
Notifications
You must be signed in to change notification settings - Fork 5
/
appveyorinit.ps1
35 lines (32 loc) · 1.15 KB
/
appveyorinit.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
33
34
35
npm i -g semantic-release @semantic-release/exec @semantic-release/changelog @semantic-release/git @semantic-release/release-notes-generator @semantic-release/commit-analyzer
if (test-path ./nextversion.txt)
{
Remove-Item ./nextversion.txt
}
semantic-release -b $env:APPVEYOR_REPO_BRANCH -d
if (test-path ./nextversion.txt)
{
$nextversion = Get-Content ./nextversion.txt
}
else
{
$nextversion = $env:GitVersion_MajorMinorPatch
}
$nextversion = $nextversion.Trim()
appveyor SetVariable -Name SemVer -Value $nextversion
appveyor AddMessage "SemVer = $nextversion"
if (![string]::IsNullOrEmpty($env:GitVersion_PreReleaseLabel))
{
$preReleaseLabel = $env:GitVersion_PreReleaseLabel.Trim()
if (![string]::IsNullOrEmpty($preReleaseLabel))
{
$nextversion = "$nextversion-$preReleaseLabel$env:GitVersion_PreReleaseNumber-$env:GitVersion_CommitsSinceVersionSourcePadded"
}
}
$nextversion = $nextversion.Trim()
appveyor SetVariable -Name Version -Value $nextversion
appveyor UpdateBuild -Version $nextversion
appveyor AddMessage "Version = $nextversion"
dotnet workload install maui
dotnet workload restore
dotnet restore -p:PublishReadyToRun=true