2018-05-26 23:18:11 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2018-11-11 22:21:10 +00:00
|
|
|
if [[ "$COMMAND" = deploy-all-travis ]]; then
|
2018-05-26 23:18:11 +00:00
|
|
|
exit 0 # no need to setup mastodon in this case
|
|
|
|
fi
|
|
|
|
|
2018-11-04 05:13:57 +00:00
|
|
|
# install ruby
|
2018-05-28 15:26:17 +00:00
|
|
|
source "$HOME/.rvm/scripts/rvm"
|
2018-11-12 20:59:47 +00:00
|
|
|
rvm install 2.5.3
|
|
|
|
rvm use 2.5.3
|
2018-05-28 15:26:17 +00:00
|
|
|
|
2018-11-05 16:58:26 +00:00
|
|
|
# fix for redis IPv6 issue
|
|
|
|
# https://travis-ci.community/t/trusty-environment-redis-server-not-starting-with-redis-tools-installed/650/2
|
|
|
|
sudo sed -e 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf > redis.conf
|
|
|
|
sudo mv redis.conf /etc/redis
|
|
|
|
sudo service redis-server start
|
|
|
|
echo PING | nc localhost 6379 # check redis running
|
2018-11-04 05:13:57 +00:00
|
|
|
|
2018-11-12 05:34:59 +00:00
|
|
|
# install ffmpeg because it's not in Trusty
|
|
|
|
if [ ! -f /home/travis/ffmpeg-static/ffmpeg ]; then
|
|
|
|
rm -fr /home/travis/ffmpeg-static
|
|
|
|
mkdir -p /home/travis/ffmpeg-static
|
|
|
|
curl -sL \
|
|
|
|
-A 'https://github.com/nolanlawson/pinafore' \
|
|
|
|
-o ffmpeg.tar.xz \
|
|
|
|
'https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz'
|
|
|
|
tar -x -C /home/travis/ffmpeg-static --strip-components 1 -f ffmpeg.tar.xz --wildcards '*/ffmpeg' --wildcards '*/ffprobe'
|
|
|
|
fi
|
|
|
|
sudo ln -s /home/travis/ffmpeg-static/ffmpeg /usr/local/bin/ffmpeg
|
|
|
|
sudo ln -s /home/travis/ffmpeg-static/ffprobe /usr/local/bin/ffprobe
|
2018-11-04 05:13:57 +00:00
|
|
|
|
|
|
|
# check versions
|
2018-05-26 23:18:11 +00:00
|
|
|
ruby --version
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
postgres --version
|
|
|
|
redis-server --version
|
|
|
|
ffmpeg -version
|