mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-10 07:08:59 +08:00
Update travis to create a "latest" symlink.
This commit is contained in:
parent
113308c317
commit
c7e3e7f22c
@ -16,6 +16,8 @@ after_success:
|
||||
- LD_LIBRARY_PATH=$WXDIR/lib package/linux/make_archive.sh linux-x64
|
||||
- package/linux/appimage.sh x86_64
|
||||
- package/deploy/sftp.sh linux ~/slic3r-upload.rsa *.bz2 Slic3r*.AppImage
|
||||
- package/deploy/sftp-symlink.sh linux ~/slic3r-upload.rsa AppImage Slic3r*.AppImage
|
||||
- package/deploy/sftp-symlink.sh linux ~/slic3r-upload.rsa bz2 *.bz2
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
38
package/deploy/sftp-symlink.sh
Normal file
38
package/deploy/sftp-symlink.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# Prerequisites
|
||||
# Environment Variables:
|
||||
# UPLOAD_USER - user to upload to sftp server
|
||||
# KEY is assumed to be path to a ssh key for UPLOAD_USER
|
||||
|
||||
DIR=$1
|
||||
shift
|
||||
KEY=$1
|
||||
shift
|
||||
EXT=$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
|
||||
filepath=$(readlink -f "$i")
|
||||
tmpfile=$(mktemp)
|
||||
echo "rm -f slic3r-${current_branch}-latest.${EXT}" > $tmpfile
|
||||
echo "symlink slic3r-${current_branch}-latest.${EXT} $filepath" >> $tmpfile
|
||||
sftp -b $tmpfile -i$KEY "${UPLOAD_USER}@dl.slic3r.org:$DIR/"
|
||||
result=$?
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Error with SFTP symlink"
|
||||
exit $result;
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "$KEY is not available, not symlinking."
|
||||
fi
|
||||
exit $result
|
Loading…
x
Reference in New Issue
Block a user