rssguard/resources/scripts/.travis-install-linux.sh

81 lines
2.5 KiB
Bash
Raw Normal View History

2016-08-24 12:30:11 +02:00
#!/bin/bash
2019-04-04 09:00:55 +02:00
ls
# Setup Qt build environment.
2019-04-03 10:07:18 +02:00
source /opt/qt512/bin/qt512-env.sh
2016-08-24 12:30:11 +02:00
mkdir rssguard-build && cd rssguard-build
2017-11-14 08:57:22 +01:00
# Build application.
2019-04-04 08:38:59 +02:00
#lrelease -compress ../rssguard.pro
2017-10-15 21:04:29 +02:00
qmake .. "USE_WEBENGINE=$USE_WEBENGINE"
2016-08-24 12:30:11 +02:00
make
2017-10-13 14:10:13 +02:00
make install
# Obtain linuxdeployqt.
2017-10-13 14:37:03 +02:00
wget -c https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
# Create AppImage.
2017-10-13 14:12:35 +02:00
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
./linuxdeployqt-continuous-x86_64.AppImage "./AppDir/usr/share/applications/com.github.rssguard.desktop" -bundle-non-qt-libs -no-translations
./linuxdeployqt-continuous-x86_64.AppImage "./AppDir/usr/share/applications/com.github.rssguard.desktop" -appimage -no-translations
# Upload image.
git config --global user.email "rotter.martinos@gmail.com"
git config --global user.name "martinrotter"
git clone https://martinrotter:${GH_TOKEN}@github.com/martinrotter/rssguard.wiki.git ./build-wiki
set -- R*.AppImage
2017-11-13 19:34:44 +01:00
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
imagename="$1"
2017-10-24 07:01:54 +02:00
git_revision=$(git rev-parse --short HEAD)
2017-10-15 21:04:29 +02:00
if [ "$USE_WEBENGINE" = true ]; then
2017-10-24 07:01:54 +02:00
imagenamenospace="rssguard-${git_revision}-linux64.AppImage"
2017-10-15 21:04:29 +02:00
else
2017-10-24 07:01:54 +02:00
imagenamenospace="rssguard-${git_revision}-nowebengine-linux64.AppImage"
2017-10-15 21:04:29 +02:00
fi
2017-10-22 20:59:59 +02:00
mv "$imagename" "$imagenamenospace"
imagename="$imagenamenospace"
ls
echo "File to upload: $imagename"
echo "URL ending: $imagenamenospace"
2017-10-24 07:01:54 +02:00
url=$(curl --upload-file "./$imagename" "https://transfer.sh/$imagenamenospace" --silent)
2017-11-13 19:34:44 +01:00
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
2017-11-14 09:37:48 +01:00
wikiline="| Linux | $(date +'%m-%d-%Y %T') | [$git_revision](https\://github.com/martinrotter/rssguard/commit/$git_revision) | [transfer.sh]($url) | $(echo "$USE_WEBENGINE") | "
2017-11-14 08:57:22 +01:00
wikifile="./build-wiki/Development-builds.md"
2017-11-14 10:05:46 +01:00
wikifilenew="./build-wiki/Development-builds.md.new"
2017-11-14 08:57:22 +01:00
echo "Line to add: $wikiline"
2017-11-14 10:05:46 +01:00
cat "$wikifile" | sed -e "s@| Linux | .\+$USE_WEBENGINE | @$wikiline@g" > "$wikifilenew"
cat "$wikifilenew"
mv "$wikifilenew" "$wikifile"
2019-04-04 09:00:55 +02:00
ls
cd ./build-wiki
git commit -a -m "New files."
git pull origin master
2019-04-04 08:38:59 +02:00
git push origin master
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
echo "Current git commit hash is $(git rev-parse HEAD)."
echo "Travis branch $TRAVIS_BRANCH and Travis tag $TRAVIS_TAG."
2019-04-04 09:24:57 +02:00
if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then
#if [[ true ]]; then
2019-04-04 08:38:59 +02:00
# We will trigger stuff for Flathub.
2019-04-04 09:00:55 +02:00
cd ../..
chmod +x resources/scripts/.flathub-release.sh
resources/scripts/.flathub-release.sh $TRAVIS_TAG $(git rev-parse HEAD)
2019-04-04 08:38:59 +02:00
fi