mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-30 01:32:03 +08:00
Deploy PRs to branches/ subdir. (#3865)
* Deploy PRs to branches/ subdir. * wrong path to util * added PR number to file name * check for appveyor pr variable * also use branches if pushing a branch on windows * also use branches if pushing a branch on unix * wrong or operator on powershell
This commit is contained in:
parent
04b59affce
commit
ab278f03e1
@ -9,6 +9,12 @@ shift
|
||||
KEY=$1
|
||||
shift
|
||||
FILES=$*
|
||||
source $(dirname $0)/../common/util.sh
|
||||
set_pr_id
|
||||
set_branch
|
||||
if [ ! -z ${PR_ID+x} ] || [ $current_branch != "master" ]; then
|
||||
DIR=${DIR}/branches
|
||||
fi
|
||||
|
||||
if [ -s $KEY ]; then
|
||||
for i in $FILES; do
|
||||
|
@ -11,5 +11,9 @@ Param(
|
||||
Set-Variable -Name "UUSER" -Value "$env:UPLOAD_USER"
|
||||
Set-Variable -Name "UPLOAD" -Value "$($FILE | Resolve-Path)"
|
||||
if (Test-Path $KEY) {
|
||||
winscp.com /privatekey=$KEY /command "open sftp://$UUSER@dl.slic3r.org/$DIR -hostkey=*" "put $UPLOAD ./$FILE" "exit"
|
||||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -Or $env:APPVEYOR_REPO_BRANCH -ne "master" ) {
|
||||
winscp.com /privatekey=$KEY /command "open sftp://$UUSER@dl.slic3r.org/$DIR/branches -hostkey=*" "put $UPLOAD ./$FILE" "exit"
|
||||
} else {
|
||||
winscp.com /privatekey=$KEY /command "open sftp://$UUSER@dl.slic3r.org/$DIR -hostkey=*" "put $UPLOAD ./$FILE" "exit"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,11 @@ install_par
|
||||
|
||||
# If we're on a branch, add the branch name to the app name.
|
||||
if [ "$current_branch" == "master" ]; then
|
||||
dmgfile=slic3r-${SLIC3R_BUILD_ID}-${1}.tar.bz2
|
||||
if [ ! -z ${PR_ID+x} ]; then
|
||||
dmgfile=slic3r-${SLIC3R_BUILD_ID}-${1}-PR${PR_ID}.tar.bz2
|
||||
else
|
||||
dmgfile=slic3r-${SLIC3R_BUILD_ID}-${1}.tar.bz2
|
||||
fi
|
||||
else
|
||||
dmgfile=slic3r-${SLIC3R_BUILD_ID}-${1}-${current_branch}.tar.bz2
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user