forked from adplug/libbinio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
78 lines (43 loc) · 2.36 KB
/
appveyor.yml
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
version: 1.5.{build}
image: Visual Studio 2017
install:
- ps: >-
# Download nuget.exe >= 3.4.4 as earlier versions produce corrupted native .nupkg files
$nugetPath = "$($env:USERPROFILE)\nuget.exe"
(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', $nugetPath)
# Make the nuget.exe folder come first in the path, so it gets picked up before anything else
$env:Path = $env:USERPROFILE + ";" + $env:Path
# Download the CoApp tools.
$msiPath = "$($env:USERPROFILE)\CoApp.Tools.Powershell.msi"
(New-Object Net.WebClient).DownloadFile('https://coapp.github.io/files/CoApp.Tools.Powershell.msi', $msiPath)
# Install the CoApp tools from the downloaded .msi.
Start-Process -FilePath msiexec -ArgumentList /i, $msiPath, /quiet -Wait
# Make the tools available for later PS scripts to use.
$env:PSModulePath = $env:PSModulePath + ';C:\Program Files (x86)\Outercurve Foundation\Modules'
Import-Module CoApp
nuget:
disable_publish_on_pr: true
build_script:
- cmd: >-
@echo off
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
"%VS150COMNTOOLS%\VsMSBuildCmd.bat"
appveyor-retry nuget restore contrib\vs2015\vs2015.sln
FOR %%T IN (v141,v140,v120_xp) DO ( FOR %%P IN (x86,x64) DO ( FOR %%C IN (Debug,Release) DO ( echo *** Building %%T/%%P/%%C *** && msbuild contrib\vs2015\libbinio\libbinio.vcxproj /p:Configuration=%%C /p:Platform=%%P /p:PlatformToolset=%%T /p:SolutionDir=..\ /v:minimal /nologo || EXIT 1 ) ) )
before_deploy:
- ps: >-
# This is the CoApp .autopkg file to create.
$autopkgFile = "contrib\vs2015\libbinio.autopkg"
# Get the ".autopkg.template" file, replace "@version" with the Appveyor version number, then save to the ".autopkg" file.
cat ($autopkgFile + ".template") | % { $_ -replace "@version", $env:appveyor_build_version } > $autopkgFile
# Use the CoApp tools to create NuGet native packages from the .autopkg.
Write-NuGetPackage $autopkgFile
# Push all newly created .nupkg files as Appveyor artifacts for later deployment.
Get-ChildItem .\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
deploy:
- provider: NuGet
api_key:
secure: MJq7LGdpkFM3r9lDPYbCL2AZVG49pJyPiuDKsYV6eMdrB1NVc4qw8YWjw+NHGClR
artifact: /.*\.nupkg/
on:
branch: master