version: 1.0.{build}
branches:
  only:
  - development/r1.0
  - release/r1.0
image: Visual Studio 2017 RC
cache:
- '%USERPROFILE%\.nuget\packages'
build_script:
- ps: >-
    $buildVersion = "rc1-$($env:APPVEYOR_BUILD_NUMBER.PadLeft(4, '0'))"

    dotnet restore /p:VersionSuffix=$buildVersion
    dotnet build --version-suffix $buildVersion

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

    $packageDir = Get-Item .\src\artifacts\packages
    dotnet pack --version-suffix $buildVersion -o $packageDir.FullName

test_script:
- ps: >-
    Dir -File -Recurse test/HTTPlease*.csproj | ForEach-Object { 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$/

version: 1.0.{build}
branches:
  only:
  - development/r1.0
  - release/r1.0
image: Visual Studio 2017 RC
cache:
- '%USERPROFILE%\.nuget\packages'
build_script:
- ps: >-
    $buildVersion = "rc1-$($env:APPVEYOR_BUILD_NUMBER.PadLeft(4, '0'))"

    dotnet restore /p:VersionSuffix=$buildVersion
    dotnet build --version-suffix $buildVersion

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

    $packageDir = Get-Item .\src\artifacts\packages
    dotnet pack --version-suffix $buildVersion --output $packageDir.FullName

test_script:
- ps: >-
    Dir -File -Recurse test/HTTPlease*.csproj | ForEach-Object { 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$/

Use --output instead of -o during CI build because the latter confuses PowerShell.
Use --output instead of -o during CI build because the latter confuses PowerShell.
