Skip to content

Commit 255e9aa

Browse files
authored
Merge pull request #1406 from asarium/build/nightlySFTP
Fix SFTP path and mac upload
2 parents 78a1e5b + 550f459 commit 255e9aa

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

ci/travis/nightly_deploy.sh

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,30 @@ if [[ ! "$(curl -V)" == *"sftp"* ]]; then
88
echo "Before:"
99
curl -V
1010

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
11+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
12+
13+
# Since the Travis CI people are not capable of enabling SSH/SCP support for their libcurl we need to build that manually...
14+
# 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/
15+
mkdir /tmp/curl
16+
cd /tmp/curl
17+
sudo apt-get update
18+
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
19+
apt-get source curl
20+
sudo apt-get build-dep curl
21+
22+
cd curl-*
23+
export DEB_BUILD_OPTIONS="nocheck"
24+
sudo dpkg-buildpackage -uc -us -j"$(grep -c ^processor /proc/cpuinfo)"
25+
26+
cd ..
27+
dpkg -l | grep curl
28+
ls -al
29+
sudo dpkg -i curl*.deb
30+
sudo dpkg -i libcurl3*.deb
31+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
32+
brew install curl --with-libssh2
33+
export PATH="/usr/local/opt/curl/bin:$PATH"
34+
fi
2935

3036
# After
3137
echo "After:"
@@ -36,7 +42,7 @@ cd /tmp/builds
3642

3743
for file in *; do
3844
# Upload to indiegames
39-
curl -k "sftp://scp.indiegames.us/public_html/builds/nightly/$VERSION_NAME/" --user "$INDIEGAMES_USER:$INDIEGAMES_PASSWORD" -T "$file" --ftp-create-dirs
45+
curl -k "sftp://scp.indiegames.us/~/public_html/builds/nightly/$VERSION_NAME/" --user "$INDIEGAMES_USER:$INDIEGAMES_PASSWORD" -T "$file" --ftp-create-dirs
4046

4147
# Upload to fs2downloads
4248
curl -k "ftp://swc.fs2downloads.com/swc.fs2downloads.com/builds/nightly/$VERSION_NAME/" --user "$FS2DOWNLOADS_USER:$FS2DOWNLOADS_PASSWORD" -T "$file" --ftp-create-dirs

0 commit comments

Comments
 (0)