forked from bobdog1986/Popcorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
78 lines (62 loc) · 3.1 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
configuration: Release
image: Visual Studio 2017
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '$(appveyor_build_version)'
assembly_file_version: '$(appveyor_build_version)'
assembly_informational_version: '$(appveyor_build_version)'
before_build:
- nuget restore
- ps: >-
$xml = [xml](Get-Content -Path .\Popcorn.nuspec)
$xml.package.metadata.version = $env:APPVEYOR_BUILD_VERSION
$xml.save(".\Popcorn.nuspec")
$version = """$env:APPVEYOR_BUILD_VERSION"""
$version
((Get-Content -path .\Popcorn\Properties\AssemblyInfo.cs -Raw) -replace 'Constants.AppVersion',$version) | Set-Content -Path .\Popcorn\Properties\AssemblyInfo.cs
build_script:
- choco install "msbuild-sonarqube-runner" -y
- MSBuild.SonarQube.Runner.exe begin /k:"%APPVEYOR_PROJECT_NAME%" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.organization=%SONAR_ORGANIZATION%" /d:"sonar.login=%SONAR_TOKEN%"
- msbuild "Popcorn.sln"
- MSBuild.SonarQube.Runner.exe end /d:"sonar.login=%SONAR_TOKEN%"
artifacts:
- path: popcorn.%APPVEYOR_BUILD_VERSION%.nupkg
name: Popcorn.Chocolatey.nupkg
- path: Popcorn\Releases\**\*.nupkg
name: Popcorn.Github.nupkg
- path: Popcorn\Releases\**\*.exe
name: Popcorn.Github.exe
- path: Popcorn\Releases\**\*.msi
name: Popcorn.Github.msi
- path: Popcorn\Releases\**\RELEASES
name: Popcorn.Github.releases
after_build:
- cmd: >-
choco pack .\chocolatey-popcorn.nuspec version=%APPVEYOR_BUILD_VERSION%
appveyor PushArtifact Popcorn.Chocolatey.nupkg -DeploymentName Popcorn
appveyor PushArtifact Popcorn.Github.nupkg -DeploymentName Popcorn
appveyor PushArtifact Popcorn.Github.exe -DeploymentName Popcorn
appveyor PushArtifact Popcorn.Github.msi -DeploymentName Popcorn
appveyor PushArtifact Popcorn.Github.releases -DeploymentName Popcorn
test_script:
- ps: >-
.\packages\opencover\4.7.922\tools\OpenCover.Console.exe -register:user -target:nunit3-console.exe "-targetargs:""Popcorn.Tests\bin\x86\$env:CONFIGURATION\net472\Popcorn.Tests.dll""" -filter:"+[Popcorn*]*" -output:opencoverCoverage.xml
$coveralls = (Resolve-Path "packages/coveralls.net/0.7.0/tools/csmacnz.coveralls.exe").ToString()
$env:APPVEYOR_BUILD_NUMBER
& $coveralls --opencover -i opencoverCoverage.xml --repoToken $env:COVERALLS_REPO_TOKEN --useRelativePaths --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_BUILD_NUMBER --serviceName appveyor
deploy:
- provider: GitHub
release: v$(appveyor_build_version)
description: 'Various improvements & fixes'
auth_token:
secure: 1gvZRwqsRGWm1ceuynEv1qbN7yfYJLRkcq34hHdvKiC0JGw9ZyzgeoW7c04xn5Lg
artifact: Popcorn.Github.nupkg,Popcorn.Github.exe,Popcorn.Github.msi,Popcorn.Github.releases
draft: false
prerelease: false
on:
branch: master
- provider: Popcorn Chocolatey
artifact: Popcorn.Chocolatey.nupkg
on:
branch: master