Skip to content

Commit 2eb1844

Browse files
committed
Work CD-CI
- Update VS extension install because marketplace is blocking downloads from AppVeyor. Signed-off-by: José Simões <[email protected]>
1 parent ba85fae commit 2eb1844

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

appveyor.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ install:
4848
- gem install bundler --quiet --no-ri --no-rdoc
4949
- gem install github_changelog_generator --quiet --no-ri --no-rdoc
5050
- dotnet tool install --tool-path . nbgv
51-
- ps: .\install-vsix-appveyor.ps1
51+
- ps: |
52+
.\install-vsix-appveyor.ps1
53+
54+
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
5255
5356
before_build:
5457
- ps: >-

install-vsix-appveyor.ps1

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
$vsixPath = "$($env:USERPROFILE)\nanoFramework.Tools.VS2017.Extension.vsix"
2-
(New-Object Net.WebClient).DownloadFile('https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vs-publisher-1470366/vsextensions/nanoFrameworkVS2017Extension/0/vspackage', $vsixPath)
1+
# Copyright (c) 2018 The nanoFramework project contributors
2+
# See LICENSE file in the project root for full license information.
3+
4+
$vsixPath = ""
5+
6+
# try downloading from VS marketplace
7+
try
8+
{
9+
$vsixPath = "$($env:USERPROFILE)\nanoFramework.Tools.VS2017.Extension.vsix"
10+
(New-Object Net.WebClient).DownloadFile('https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vs-publisher-1470366/vsextensions/nanoFrameworkVS2017Extension/0/vspackage', $vsixPath)
11+
}
12+
catch
13+
{
14+
# download failed, try fron MyGet feed
15+
$vsixPath = "$($env:USERPROFILE)\47973986-ed3c-4b64-ba40-a9da73b44ef7-1.0.1.0.vsix"
16+
(New-Object Net.WebClient).DownloadFile('https://www.myget.org/F/nanoframework-dev/vsix/47973986-ed3c-4b64-ba40-a9da73b44ef7-1.0.1.0.vsix', $vsixPath)
17+
}
18+
319
"`"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VSIXInstaller.exe`" /q /a $vsixPath" | out-file ".\install-vsix.cmd" -Encoding ASCII
420

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

0 commit comments

Comments
 (0)