1
0

build-appveyor.ps1 821 B

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