Skip to content

Commit 78a1e5b

Browse files
authored
Merge pull request #1403 from asarium/build/nightlySFTP
Compile curl with SSH support for nightly deploy
2 parents ffe647b + 080ce84 commit 78a1e5b

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

ci/travis/nightly_deploy.sh

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,43 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

33
set -e
44
set -u
55

6+
if [[ ! "$(curl -V)" == *"sftp"* ]]; then
7+
# Before
8+
echo "Before:"
9+
curl -V
10+
11+
# Since the Travis CI people are not capable of enabling SSH/SCP support for their libcurl we need to build that manually...mkdir /tmp/curl
12+
# These commands are based on the tutorial from here: http://zeroset.mnim.org/2013/03/14/sftp-support-for-curl-in-ubuntu-12-10-quantal-quetzal-and-later/
13+
mkdir /tmp/curl
14+
cd /tmp/curl
15+
sudo apt-get update
16+
sudo apt-get install build-essential debhelper libssh2-1-dev libgnutls-dev libidn11-dev libkrb5-dev libldap2-dev libnss3-dev librtmp-dev libtool openssh-server quilt
17+
apt-get source curl
18+
sudo apt-get build-dep curl
19+
20+
cd curl-*
21+
export DEB_BUILD_OPTIONS="nocheck"
22+
sudo dpkg-buildpackage -uc -us -j"$(grep -c ^processor /proc/cpuinfo)"
23+
24+
cd ..
25+
dpkg -l | grep curl
26+
ls -al
27+
sudo dpkg -i curl*.deb
28+
sudo dpkg -i libcurl3*.deb
29+
30+
# After
31+
echo "After:"
32+
curl -V
33+
fi
34+
635
cd /tmp/builds
736

837
for file in *; do
938
# Upload to indiegames
10-
curl -k "ftp://scp.indiegames.us/public_html/builds/nightly/$VERSION_NAME/" --user "$INDIEGAMES_USER:$INDIEGAMES_PASSWORD" -T "$file" --ftp-create-dirs
39+
curl -k "sftp://scp.indiegames.us/public_html/builds/nightly/$VERSION_NAME/" --user "$INDIEGAMES_USER:$INDIEGAMES_PASSWORD" -T "$file" --ftp-create-dirs
1140

1241
# Upload to fs2downloads
1342
curl -k "ftp://swc.fs2downloads.com/swc.fs2downloads.com/builds/nightly/$VERSION_NAME/" --user "$FS2DOWNLOADS_USER:$FS2DOWNLOADS_PASSWORD" -T "$file" --ftp-create-dirs
14-
done
43+
done

0 commit comments

Comments
 (0)