2016-09-07 23:11:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# sf_upload <deploylist> <sf_dir>
|
|
|
|
sf_upload()
|
|
|
|
{
|
|
|
|
/usr/bin/expect <<-EOD
|
2016-09-18 21:51:19 +02:00
|
|
|
spawn scp $1 hyperionsf37@frs.sourceforge.net:/home/frs/project/hyperion-project/dev/$2
|
2016-09-07 23:11:08 +02:00
|
|
|
expect "*(yes/no)*"
|
|
|
|
send "yes\r"
|
|
|
|
expect "*password:*"
|
|
|
|
send "$SFPW\r"
|
|
|
|
expect eof
|
|
|
|
EOD
|
|
|
|
}
|
|
|
|
|
2016-09-17 21:38:54 +02:00
|
|
|
deploylist="hyperion-2.0.0-Linux-x86.tar.gz"
|
2016-09-07 23:11:08 +02:00
|
|
|
|
|
|
|
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
|
|
|
|
cd $TRAVIS_BUILD_DIR/build
|
|
|
|
if [[ -n $TRAVIS_TAG ]]; then
|
|
|
|
echo "tag upload"
|
|
|
|
sf_upload $deploylist release
|
|
|
|
elif [[ $TRAVIS_EVENT_TYPE == 'cron' ]]; then
|
|
|
|
echo "cron upload"
|
2016-09-11 13:21:34 +02:00
|
|
|
sf_upload $deploylist alpha
|
2016-09-07 23:11:08 +02:00
|
|
|
else
|
|
|
|
echo "PR can't be uploaded for security reasons"
|
2017-07-30 23:34:19 +02:00
|
|
|
sf_upload $deploylist pr
|
2016-09-07 23:11:08 +02:00
|
|
|
fi
|
|
|
|
fi
|