Added winscp deployment script

This commit is contained in:
Joseph Lenox 2017-04-04 20:05:39 -05:00
parent a3130272e6
commit 207742ea0f
2 changed files with 14 additions and 3 deletions

13
package/deploy/winscp.ps1 Executable file
View File

@ -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

View File

@ -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