From 207742ea0fb062f6269460077867da023ecc46f3 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 4 Apr 2017 20:05:39 -0500 Subject: [PATCH] Added winscp deployment script --- package/deploy/winscp.ps1 | 13 +++++++++++++ package/win/appveyor_deploy.ps1 | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 package/deploy/winscp.ps1 diff --git a/package/deploy/winscp.ps1 b/package/deploy/winscp.ps1 new file mode 100755 index 0000000000..174dd23fb7 --- /dev/null +++ b/package/deploy/winscp.ps1 @@ -0,0 +1,13 @@ +# Prerequisites +# Environment Variables: +# UPLOAD_USER - user to upload to sftp server +# KEY is assumed to be path to a ssh key for UPLOAD_USER + +param ( + [parameter(Mandatory=$true, ParameterSetName="dir")] [string]$DIR, + [parameter(Mandatory=$true, ParameterSetName="key")] [string]$KEY, + [parameter(Mandatory=$true, ParameterSetName="file")] [string]$FILES, + +) +UUSER=$env:UPLOAD_USER +winscp.exe scp://$UUSER@dl.slic3r.org:$DIR /hostkey=* /privatekey=$KEY /upload $FILES diff --git a/package/win/appveyor_deploy.ps1 b/package/win/appveyor_deploy.ps1 index c78a13dc99..39d101c1a0 100644 --- a/package/win/appveyor_deploy.ps1 +++ b/package/win/appveyor_deploy.ps1 @@ -3,9 +3,7 @@ cd package/win ./compile_wrapper.ps1 524 | Write-Output ./package_win32.ps1 524| Write-Output cd ../../ -$myPath = $(pwd) -replace "\\", "/" -$myPath = $myPath -replace "C:", "/c" -& 'C:\msys64\usr\bin\bash.exe' -c "PATH=/c/msys64/usr/bin:$PATH BUILD_DIR=$env:APPVEYOR_BUILD_FOLDER UPLOAD_USER=$env:UPLOAD_USER $mypath/package/deploy/sftp.sh win $BUILD_FOLDER/slic3r-upload.rsa.appveyor *.zip" +& package/deploy/winscp.ps1 -dir win -key $BUILD_FOLDER/package/deploy/slic3r-upload.rsa.appveyor -file *.zip: if (!(Test-Path C:\project\slic3r\slic3r.par)) { Add-AppveyorCompilationMessage -Message "Failed to package!" -Category Error