version: 1.5.{build}
skip_tags: true
configuration: Release
clone_folder: C:\Projects\MRTD.NET\
cache:
- packages -> **\packages.config
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
COVERALLS_REPO_TOKEN:
secure: XWiL6LEQaVhFTVjsb0NUG37Zdv5uenF7aKl0Vhkre446M8zElJKfqL8R+RuvLGlp
before_build:
- nuget restore ".\MRTD.NET.sln"
build:
project: .\MRTD.NET.sln
publish_nuget: true
verbosity: minimal
test_script:
- ps: >-
.\packages\OpenCover.*\tools\OpenCover.Console.exe -register:user -target:nunit3-console.exe "-targetargs:""SmartCardApi\bin\$env:CONFIGURATION\SmartCardApi.dll" "DemoApp\bin\$env:CONFIGURATION\DemoApp.dll"" " -filter:"+[SmartCardApi*]*" -output:opencoverCoverage.xml
$coveralls = (Resolve-Path "packages/coveralls.net.*/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
before_package:
- ps: "$projectName = \"SmartCardApi\"\n\n$csprojPathTemplate = \".\\PROJECT_NAME\\PROJECT_NAME.csproj\"\n$csprojPath = $csprojPathTemplate -replace \"PROJECT_NAME\", $projectName\n\nfunction replaceSymbolsInFile($regex, $path) \n{ \n (Get-Content $path) -replace $regex,'' | out-file $path -encoding utf8\n}\n\n$testCSFilesRegex = ''\nreplaceSymbolsInFile $testCSFilesRegex $csprojPath\n\n$pakageNames = @(\n \"Nunit\",\n \"OpenCover\",\n \"coveralls.net\"\n)\n$packagesConfigPath = \".\\\" + $projectName + \"\\packages.config\"\nForeach($packageName in $pakageNames) {\n $packagesRegexTemplate = '