Skip to content

Commit 3ac12a5

Browse files
authored
Fix issues with AppVeyor yaml [skip ci] (#48)
1 parent 16554e2 commit 3ac12a5

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

appveyor.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ init:
4848
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GitHubToken):[email protected]`n"
4949
- git config --global user.email "%GitHubUserEmail%"
5050
- git config --global user.name "%GitHubUserName%"
51-
- ps: "$headers = if($env:APPVEYOR_PULL_REQUEST_NUMBER){\n @{\n \"Authorization\" = \"Basic $env:GitRestAuth\"\n \"Content-type\" = \"application/json\"\n}\n\n$pr = Invoke-RestMethod -Uri \"https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/pulls/$env:APPVEYOR_PULL_REQUEST_NUMBER\" -Headers $headers -Method GET\n\nif($pr.user.login -eq \"nfbot\" -and $pr.body -match \"*[version update]*\")\n{\n # commit was from nfbot AND it's taged as a [version update]\n # OK to skip AppVeyor build \n \"Version update only. Skipping build.\" | Write-Host -BackgroundColor White -ForegroundColor Blue\n Exit-AppveyorBuild\n} }\n"
51+
- ps: "$headers = if($env:APPVEYOR_PULL_REQUEST_NUMBER){\n @{\n \"Authorization\" = \"Basic $env:GitRestAuth\"\n \"Content-type\" = \"application/json\"\n}\n\n$pr = Invoke-RestMethod -Uri \"https://api.github.com/repos/$env:APPVEYOR_REPO_NAME/pulls/$env:APPVEYOR_PULL_REQUEST_NUMBER\" -Headers $headers -Method GET\n\nif($pr.user.login -eq \"nfbot\" -and $pr.body -like \"*[version update]*\")\n{\n # commit was from nfbot AND it's taged as a [version update]\n # OK to skip AppVeyor build \n \"Version update only. Skipping build.\" | Write-Host -BackgroundColor White -ForegroundColor Blue\n Exit-AppveyorBuild\n} }\n"
5252
- ps: "if($env:APPVEYOR_PULL_REQUEST_NUMBER -eq \"\")\n{\n \n if($env:APPVEYOR_REPO_COMMIT_AUTHOR -eq \"nfbot\" -and $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -like \"*[version update]*\")\n {\n # commit was from nfbot AND it's taged as a [version update]\n # OK to skip AppVeyor build \n \"Version update only. Skipping build.\" | Write-Host -BackgroundColor White -ForegroundColor Blue\n Exit-AppveyorBuild\n }\n}"
5353

5454
install:
@@ -66,6 +66,11 @@ before_build:
6666
6767
C:\ProgramData\chocolatey\lib\GitVersion.Portable\tools\GitVersion.exe /l console /output buildserver /updateAssemblyInfo "source\nanoFramework.CoreLibrary\System\AssemblyInfo2.cs"
6868
69+
after_deploy:
70+
# for this environment variable to work here it has to be set in AppVeyor UI
71+
- nuget push source\Nuget.CoreLibrary\bin\Release\nanoFramework.CoreLibrary.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
72+
- nuget push source\Nuget.CoreLibrary.DELIVERABLES\bin\Release\nanoFramework.CoreLibrary.DELIVERABLES.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
73+
6974
build_script:
7075
- ps: >-
7176
@@ -120,6 +125,8 @@ for:
120125
draft: true
121126
prerelease: false
122127
force_update: true
128+
on:
129+
appveyor_repo_tag: false
123130

124131
-
125132
branches:
@@ -137,11 +144,8 @@ for:
137144
draft: true
138145
prerelease: true
139146
force_update: true
140-
141-
after_deploy:
142-
# for this environment variable to work here it has to be set in AppVeyor UI
143-
- nuget push source\Nuget.CoreLibrary\bin\Release\nanoFramework.CoreLibrary.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
144-
- nuget push source\Nuget.CoreLibrary.DELIVERABLES\bin\Release\nanoFramework.CoreLibrary.DELIVERABLES.%GitVersion_NuGetVersionV2%.nupkg %MyGetToken% -Source https://www.myget.org/F/nanoframework-dev/api/v2/package
147+
on:
148+
appveyor_repo_tag: false
145149

146150
-
147151
branches:
@@ -164,3 +168,5 @@ for:
164168
draft: true
165169
prerelease: true
166170
force_update: true
171+
on:
172+
appveyor_repo_tag: false

commit-assemblyinfo-changes.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ else
77
{
88
# updated assembly info files
99
git add "source\nanoFramework.CoreLibrary\System\AssemblyInfo2.cs"
10-
git commit -m "Update assembly info file for v$env:GitVersion_NuGetVersionV2 [skip ci]" -m"[version update]"
10+
git commit -m "Update assembly info file for v$env:GitVersion_NuGetVersionV2" -m"[version update]"
1111
git push origin --porcelain -q > $null
1212

1313
'Updated assembly info...' | Write-Host -ForegroundColor White -NoNewline

install-vsix-appveyor.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ $vsixPath = "$($env:USERPROFILE)\nanoFramework.Tools.VS2017.Extension.vsix"
44

55
'Installing nanoFramework VS extension ...' | Write-Host -ForegroundColor White -NoNewline
66

7-
& .\install-vsix.cmd --quiet --no-verbose > $null
7+
& .\install-vsix.cmd > $null
88

99
'OK' | Write-Host -ForegroundColor Green

0 commit comments

Comments
 (0)