@@ -20,21 +20,6 @@ branches:
2020
2121clone_depth : 1
2222
23- init :
24- - ps : |
25- If ($Env:APPVEYOR_REPO_TAG_NAME -match "-"){
26- $headers = @{
27- "Authorization" = "Bearer $env:GITHUB_TOKEN"
28- "Content-type" = "application/json"
29- }
30- $releases = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/releases" -Headers $headers -Method GET
31- $env:releaseDescription = ($releases | Where-Object {$_.name -eq "$env:APPVEYOR_REPO_TAG_NAME"}).body
32- Set-AppveyorBuildVariable -Name "IsPreRelease" -Value True
33- }
34- Else{
35- Set-AppveyorBuildVariable -Name "IsPreRelease" -Value False
36- }
37-
3823environment :
3924 global :
4025 # Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages
@@ -57,9 +42,23 @@ nuget:
5742 # Do not publish NuGet packages for pull requests
5843 disable_publish_on_pr : true
5944
45+
6046init :
61- # Good practise, because Windows line endings are different from Unix/Linux ones
62- - cmd : git config --global core.autocrlf true
47+ - ps : |
48+ If ($Env:APPVEYOR_REPO_TAG_NAME -match "-"){
49+ $headers = @{
50+ "Authorization" = "Bearer $env:GITHUB_TOKEN"
51+ "Content-type" = "application/json"
52+ }
53+ $releases = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/releases" -Headers $headers -Method GET
54+ $env:releaseDescription = ($releases | Where-Object {$_.name -eq "$env:APPVEYOR_REPO_TAG_NAME"}).body
55+ Set-AppveyorBuildVariable -Name "IsPreRelease" -Value True
56+ }
57+ Else{
58+ Set-AppveyorBuildVariable -Name "IsPreRelease" -Value False
59+ }
60+ # Good practise, because Windows line endings are different from Unix/Linux ones
61+ - cmd : git config --global core.autocrlf true
6362
6463install :
6564 # .NET Core SDK binaries
0 commit comments