2016-08-24 12:30:11 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-10-15 20:36:32 +02:00
|
|
|
# Setup Qt build environment.
|
2017-09-22 06:56:52 +02:00
|
|
|
source /opt/qt59/bin/qt59-env.sh
|
2016-08-24 12:30:11 +02:00
|
|
|
mkdir rssguard-build && cd rssguard-build
|
2017-10-15 20:36:32 +02:00
|
|
|
|
2017-11-07 09:16:41 +01:00
|
|
|
# Build application.
|
|
|
|
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
|
|
|
|
|
2017-10-15 20:36:32 +02:00
|
|
|
# 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
|
|
|
|
|
2017-10-15 20:36:32 +02:00
|
|
|
# Create AppImage.
|
2017-10-13 14:12:35 +02:00
|
|
|
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
2017-10-22 19:08:07 +02:00
|
|
|
./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
|
2017-10-15 20:36:32 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2017-10-15 20:36:32 +02:00
|
|
|
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"
|
|
|
|
|
2017-10-15 20:36:32 +02:00
|
|
|
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-10-24 07:18:13 +02:00
|
|
|
echo "| $(date +'%m-%d-%Y %T') | [$git_revision](https://github.com/martinrotter/rssguard/commit/$git_revision) | [transfer.sh]($url) | $(echo "$USE_WEBENGINE") | "$'\r' >> ./build-wiki/Linux-development-builds.md
|
2017-10-15 20:36:32 +02:00
|
|
|
|
|
|
|
cd ./build-wiki
|
|
|
|
git commit -a -m "New files."
|
|
|
|
git pull origin master
|
|
|
|
git push origin master
|