Browse Source

build: publish nuget after tests and only from master

pull/148/head
Nikita Tsukanov 11 years ago
parent
commit
8e38e64562
  1. 2
      appveyor.yml
  2. 21
      nuget/build-appveyor.ps1

2
appveyor.yml

@ -11,7 +11,7 @@ environment:
configuration:
- Release
after_build:
after_tests:
- ps: nuget\build-appveyor.ps1
artifacts:

21
nuget/build-appveyor.ps1

@ -2,7 +2,10 @@ $scriptpath = $MyInvocation.MyCommand.Path
$dir = Split-Path $scriptpath
Push-Location $dir
sv version $env:APPVEYOR_BUILD_NUMBER
#sv version "1-debug"
sv version 9999.0.$version-nightly
sv key $env:myget_key
@ -11,4 +14,20 @@ sv file Perspex.$version.nupkg
.\build-version.ps1 $version
nuget.exe push $file $key -Source https://www.myget.org/F/perspex-nightly/api/v2/package
sv reponame $env:APPVEYOR_REPO_NAME
sv repobranch $env:APPVEYOR_REPO_BRANCH
sv pullreq $env:APPVEYOR_PULL_REQUEST_NUMBER
echo "Checking for publishing"
echo $reponame $repobranch $pullreq
if ($reponame -eq "Perspex/Perspex")
{
echo Repo name matched
if($repobranch -eq "master")
{
echo Repo branch matched
nuget.exe push $file $key -Source https://www.myget.org/F/perspex-nightly/api/v2/package
}
}

Loading…
Cancel
Save