build-appveyor.ps1 779 B

12345678910111213141516171819202122232425262728293031323334
  1. $scriptpath = $MyInvocation.MyCommand.Path
  2. $dir = Split-Path $scriptpath
  3. Push-Location $dir
  4. sv version $env:APPVEYOR_BUILD_NUMBER
  5. #sv version "1-debug"
  6. sv version 9999.0.$version-nightly
  7. sv key $env:myget_key
  8. . "include.ps1"
  9. .\build-version.ps1 $version
  10. sv reponame $env:APPVEYOR_REPO_NAME
  11. sv repobranch $env:APPVEYOR_REPO_BRANCH
  12. sv pullreq $env:APPVEYOR_PULL_REQUEST_NUMBER
  13. echo "Checking for publishing"
  14. echo "$reponame $repobranch $pullreq"
  15. if ([string]::IsNullOrWhiteSpace($pullreq))
  16. {
  17. echo "Build is not a PR"
  18. if($repobranch -eq "master")
  19. {
  20. echo "Repo branch matched"
  21. foreach($pkg in $Packages)
  22. {
  23. nuget.exe push $pkg.$version.nupkg $key -Source https://www.myget.org/F/perspex-nightly/api/v2/package
  24. }
  25. }
  26. }