Commit c81f99cf27fd9d9f13bddc94da5bb1430bc991fb

Carlos Martín Nieto 2017-01-14T13:23:51

ssh: handle libssh2 DLL path for mingw

diff --git a/appveyor.yml b/appveyor.yml
index 29a6bac..a03199d 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -35,13 +35,17 @@ test_script:
 - ps: |
     $ErrorActionPreference="Stop"
     Start-FileDownload https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar -FileName poxyproxy.jar
+    if ($env:GENERATOR -eq "MSYS Makefiles") {
+      Set-Variable -Name "libssh2_target" -Value $Env:APPVEYOR_BUILD_FOLDER\build
+    } else {
+      Set-Variable -Name "libssh2_target" -Value $Env:APPVEYOR_BUILD_FOLDER\build\Debug
+    }
     if ($env:ARCH -eq "64") {
-       curl https://dl.bintray.com/libgit2/compiled-binaries/win64/libssh2.dll -OutFile $Env:APPVEYOR_BUILD_FOLDER\build\Debug\libssh2.dll
+       curl https://dl.bintray.com/libgit2/compiled-binaries/win64/libssh2.dll -OutFile $libssh2_target\libssh2.dll
     } else {
-        curl https://dl.bintray.com/libgit2/compiled-binaries/libssh2.dll -OutFile $Env:APPVEYOR_BUILD_FOLDER\build\Debug\libssh2.dll
+        curl https://dl.bintray.com/libgit2/compiled-binaries/libssh2.dll -OutFile $libssh2_target\libssh2.dll
     }
     ls
-    ls Debug
     # Run this early so we know it's ready by the time we need it
     $proxyJob = Start-Job { java -jar $Env:APPVEYOR_BUILD_FOLDER\build\poxyproxy.jar -d --port 8080 --credentials foo:bar }
     ctest -V -R libgit2_clar