version: 1.0.{build}
branches:
  only:
  - development/r1.0
  - release/r1.0
image: Visual Studio 2015
cache:
- '%USERPROFILE%\.nuget\packages'
build_script:
- ps:
    dotnet restore

    $buildVersion = "beta2-$($env:APPVEYOR_BUILD_NUMBER.PadLeft(4, '0'))"
    
    dotnet build --version-suffix $buildVersion "src/HTTPlease*/project.json" "test/HTTPlease*/project.json"

    MkDir .\src\artifacts\packages -EA SilentlyContinue | Out-Null

    Dir src/HTTPlease* -Directory | % { dotnet pack --version-suffix $buildVersion -o src/artifacts/packages $_ }

test_script:
- ps: >-
    Dir test/HTTPlease* -Directory | % { dotnet test $_ }

deploy_script:
- ps: >-
    $buildVersion = "beta2-$($env:APPVEYOR_BUILD_NUMBER.PadLeft(4, '0'))"

    Dir src/HTTPlease* -Directory | % { dotnet pack --version-suffix $buildVersion -o src/artifacts/packages $_ }

artifacts:
- path: src\artifacts\packages\*.nupkg

deploy:
  provider: NuGet
  on:
    branch: release/r1.0
  api_key:
    secure: ljl/r7XeQm+KBzR7pm1OOW4+YcDUsYiWlr9jWFztMh/8/orG4V9ylTi+P1jGME7g
  skip_symbols: false
  artifact: /.*\.nupkg$/

version: 1.0.{build}
branches:
  only:
  - development/r1.0
  - release/r1.0
image: Visual Studio 2015
cache:
- '%USERPROFILE%\.nuget\packages'
build_script:
- ps:
    dotnet restore

    $buildVersion = "beta2-$($env:APPVEYOR_BUILD_NUMBER.PadLeft(4, '0'))"
    
    dotnet build --version-suffix $buildVersion "src/HTTPlease*/project.json" "test/HTTPlease*/project.json"

    MkDir .\src\artifacts\packages -EA SilentlyContinue | Out-Null

    Dir src/HTTPlease* -Directory | % { dotnet pack --version-suffix $buildVersion -o src/artifacts/packages $_ }

test_script:
- ps: >-
    Dir test/HTTPlease* -Directory | % { dotnet test $_ }

artifacts:
- path: src\artifacts\packages\*.nupkg

deploy:
  provider: NuGet
  on:
    branch: release/r1.0
  api_key:
    secure: ljl/r7XeQm+KBzR7pm1OOW4+YcDUsYiWlr9jWFztMh/8/orG4V9ylTi+P1jGME7g
  skip_symbols: false
  artifact: /.*\.nupkg$/

Fix deploy script (no longer publishing packages to nuget.org).
Fix deploy script (no longer publishing packages to nuget.org).
