-
Notifications
You must be signed in to change notification settings - Fork 16
/
appveyor.yml
76 lines (61 loc) · 2.24 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
configuration: Release
image: Visual Studio 2017
install:
- set PATH=C:\Ruby23\bin;%PATH%
- ps: $AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols"
- ps: mkdir c:\ca; iwr https://curl.haxx.se/ca/cacert.pem -outfile C:\ca\cacert.pem
- set SSL_CERT_FILE=C:\ca\cacert.pem
- ps: |
$version = [version]$(cat VERSION)
$build = $env:APPVEYOR_BUILD_NUMBER
$major = $version.Major
$branch = $env:APPVEYOR_REPO_BRANCH
if ($branch -eq 'master') {
$version = "$version-ci-$build"
} elseif ($env:APPVEYOR_REPO_TAG -eq "true") {
$version = $env:APPVEYOR_REPO_TAG_NAME
} elseif ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$version = "$version-pr-$env:APPVEYOR_PULL_REQUEST_NUMBER-$build"
} else {
$version = "$version-br-$branch-$build"
}
Set-AppveyorBuildVariable -Name "AssemblyMajor" -Value "$major"
Update-AppVeyorBuild -Version "$version"
Write-Output "$version"
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
gem install chandler --no-ri --no-rdoc
set-content ~/.netrc "machine api.github.com login $env:github_username password $env:github_password" -encoding ascii
cp ~/.netrc ~/_netrc
chandler push
}
dotnet_csproj:
patch: true
file: '**\*.csproj;**\*.props'
version: '{version}'
package_version: '{version}'
assembly_version: $(AssemblyMajor).0.0.0
file_version: '{version}'
informational_version: '{version}'
environment:
SSL_CERT_FILE: C:\ca\cacert.pem
github_username: serialseb
github_password:
secure:
1lXaOJ0GvCAOd0O9DDvVqw2eb7TvP2jve12u3hD2g4J7RVW2c2jC5XuRFyEuduUA
nuget:
project_feed: true
disable_publish_on_pr: true
before_build:
- cd .\src\
- dotnet restore --verbosity Minimal
build_script:
- dotnet build --configuration %CONFIGURATION%
test_script:
- dotnet test .\OpenRasta.Hosting.AspNet.Tests.Integration\
- dotnet test .\Tests\
after_build:
- dotnet pack .\OpenRasta.Hosting.AspNet --include-symbols --configuration %CONFIGURATION% --no-build --output ..\..\nupkgs
artifacts:
- path: nupkgs\*.nupkg
name: nuget