-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathappveyor.yml
More file actions
86 lines (72 loc) · 3.79 KB
/
appveyor.yml
File metadata and controls
86 lines (72 loc) · 3.79 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: 2.0.0.{build}
branches:
only:
- master
skip_tags: true
image: Visual Studio 2019
init:
- git config --global core.autocrlf true
before_build:
- ps: |
$msbuildPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild"
Write-Output "Installing .NET MicroFramework 4.4 ..."
$msiPath = "$($env:USERPROFILE)\MicroFrameworkSDK44.MSI"
(New-Object Net.WebClient).DownloadFile('https://github.com/NETMF/netmf-interpreter/releases/download/v4.4-RTW-20-Oct-2015/MicroFrameworkSDK.MSI', $msiPath)
Start-Process -FilePath msiexec.exe -ArgumentList "/i $($env:USERPROFILE)\MicroFrameworkSDK44.MSI /quiet /log $env:USERPROFILE\netmf44.log" -Wait
if (Test-Path -Path "${env:PROGRAMFILES(X86)}\MSBuild\Microsoft\.NET Micro Framework")
{
Write-Output "Copying to VS MSBuild..."
Copy-Item -Path "${env:PROGRAMFILES(X86)}\MSBuild\Microsoft\.NET Micro Framework" -Destination "$msbuildPath\Microsoft" -Recurse
}
Write-Output "NETMF44 Installed"
Write-Output "Installing nanoFramework VS extension ..."
[System.Net.WebClient]$webClient = New-Object System.Net.WebClient
$webClient.Headers.Add("User-Agent", "request")
$webClient.Headers.Add("Accept", "application/vnd.github.v3+json")
$releaseList = $webClient.DownloadString('https://api.github.com/repos/nanoframework/nf-Visual-Studio-extension/releases?per_page=100')
if($releaseList -match '\"(?<VS2022_version>v2022\.\d+\.\d+\.\d+)\"')
{
$vs2022Tag = $Matches.VS2022_version
}
if($releaseList -match '\"(?<VS2019_version>v2019\.\d+\.\d+\.\d+)\"')
{
$vs2019Tag = $Matches.VS2019_version
}
$VsWherePath = "${env:PROGRAMFILES(X86)}\Microsoft Visual Studio\Installer\vswhere.exe"
Write-Output "VsWherePath is: $VsWherePath"
$VsInstance = $(&$VSWherePath -latest -property displayName)
Write-Output "Latest VS is: $VsInstance"
if($vsInstance.Contains('2022'))
{
$extensionUrl = "https://github.com/nanoframework/nf-Visual-Studio-extension/releases/download/$vs2022Tag/nanoFramework.Tools.VS2022.Extension.vsix"
$vsixPath = Join-Path $($env:USERPROFILE) "nanoFramework.Tools.VS2022.Extension.zip"
$extensionVersion = $vs2022Tag
}
elseif($vsInstance.Contains('2019'))
{
$extensionUrl = "https://github.com/nanoframework/nf-Visual-Studio-extension/releases/download/$vs2019Tag/nanoFramework.Tools.VS2019.Extension.vsix"
$vsixPath = Join-Path $($env:USERPROFILE) "nanoFramework.Tools.VS2019.Extension.zip"
$extensionVersion = $vs2019Tag
}
Write-Output "Downloading visx..." -NoNewline
Write-Debug "Download VSIX file from $extensionUrl to $vsixPath"
$webClient.DownloadFile($extensionUrl, $vsixPath)
$outputPath = "$($env:USERPROFILE)\nf-extension"
Write-Debug "Unzip extension content"
Expand-Archive $vsixPath -DestinationPath $outputPath
Write-Debug "Copy build files to msbuild location"
Copy-Item -Path "$($env:USERPROFILE)\nf-extension\`$MSBuild\nanoFramework" -Destination $msbuildPath -Recurse
Write-Output "Copying NuGet.exe ..."
New-Item c:\projects\amqpnetlite\build\tools -type directory
Copy-Item -Path c:\tools\NuGet\NuGet.exe -Destination c:\projects\amqpnetlite\build\tools\NuGet.exe
'OK' | Write-Host -ForegroundColor Green
build_script:
- ps: |
Write-Output "Invoking build.cmd script for Debug..."
.\build.cmd --solution "amqp.sln amqp-netmf.sln amqp-nanoFramework.sln" | Write-Output
Write-Output "Invoking build.cmd script for Release..."
.\build.cmd release --solution "amqp.sln amqp-netmf.sln amqp-nanoFramework.sln" | Write-Output
test: off
deploy: off
on_failure:
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))