Implementing pushing prereleases to github
MODIFY
scripts/linux/after_success.sh
scripts/linux/after_success.sh
set -e
-if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
+if ([ "$TRAVIS_BRANCH" = "master" ] || [ "${TRAVIS_BRANCH}" = "prerelease" ]) &&
+ [ "$TRAVIS_PULL_REQUEST" = "false" ] &&
+ ([ "$TRAVIS_EVENT_TYPE" = "push" ] || [ "$TRAVIS_EVENT_TYPE" = "api" ]); then
+ export UPLOADTOOL_SUFFIX=${TRAVIS_BRANCH}
find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh Ripes*.AppImage*

MODIFY
scripts/linux/before_install.sh
scripts/linux/before_install.sh
@@ -6,3 +6,7 @@ export CXX=g++-8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
source /opt/qt*/bin/qt*-env.sh
+
+if [ "${TRAVIS_BRANCH}" = "prerelease" ]; then
+ echo "Ripes prerelease build"
+fi

MODIFY
scripts/linux/travisbuild.sh
scripts/linux/travisbuild.sh
@@ -16,7 +16,13 @@ mv Ripes appdir/usr/bin/
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
+
+if [ "${TRAVIS_BRANCH}" = "prerelease" ]; then
export VERSION=continuous-linux # linuxdeployqt uses this for naming the file
+else
+ export VERSION=${TRAVIS_BRANCH}-linux # linuxdeployqt uses this for naming the file
+fi
+
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage -extra-plugins=iconengines
echo "Post bundle folder contents:"

MODIFY
scripts/mac/after_success.sh
scripts/mac/after_success.sh
set -e
-if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
+if ([ "$TRAVIS_BRANCH" = "master" ] || [ "${TRAVIS_BRANCH}" = "prerelease" ]) &&
+ [ "$TRAVIS_PULL_REQUEST" = "false" ] &&
+ ([ "$TRAVIS_EVENT_TYPE" = "push" ] || [ "$TRAVIS_EVENT_TYPE" = "api" ]); then
+ export UPLOADTOOL_SUFFIX=${TRAVIS_BRANCH}
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh Ripes*.zip
fi
\ No newline at end of file

MODIFY
scripts/mac/before_install.sh
scripts/mac/before_install.sh
@@ -22,3 +22,7 @@ pushd ${TRAVIS_BUILD_DIR}
mkdir -p Qt/5.13.0
curl --output Qt-5.13.0-mac.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.13.0-mac.tar.xz
tar -xJ -C Qt/5.13.0 -f Qt-5.13.0-mac.tar.xz
+
+if [ "${TRAVIS_BRANCH}" = "prerelease" ]; then
+ echo "Ripes prerelease build"
+fi

MODIFY
scripts/mac/travisbuild.sh
scripts/mac/travisbuild.sh
@@ -16,7 +16,12 @@ ls -lh
# Bundle the app
macdeployqt Ripes.app
+if [ "${TRAVIS_BRANCH}" = "prerelease" ]; then
+ APPNAME=Ripes-${TRAVIS_BRANCH}-mac-x86_64
+else
APPNAME=Ripes-continuous-mac-x86_64
+fi
+
sudo mv Ripes.app $APPNAME.app
sudo zip -r ${APPNAME}.zip ${APPNAME}.app/

MODIFY
scripts/windows/after_success.sh
scripts/windows/after_success.sh
set -e
-if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
- echo "Uploading to git"
+if ([ "$TRAVIS_BRANCH" = "master" ] || [ "${TRAVIS_BRANCH}" = "prerelease" ]) &&
+ [ "$TRAVIS_PULL_REQUEST" = "false" ] &&
+ ([ "$TRAVIS_EVENT_TYPE" = "push" ] || [ "$TRAVIS_EVENT_TYPE" = "api" ]); then
+ export UPLOADTOOL_SUFFIX=${TRAVIS_BRANCH}
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh ${APPNAME}
fi

MODIFY
scripts/windows/before_install.sh
scripts/windows/before_install.sh
@@ -15,3 +15,8 @@ bash install-qt.sh \
qtbase qttools svg
choco install zip
+
+
+if [ "${TRAVIS_BRANCH}" = "prerelease" ]; then
+ echo "Ripes prerelease build"
+fi

MODIFY
scripts/windows/travisbuild.sh
scripts/windows/travisbuild.sh
@@ -15,7 +15,13 @@ cmake --build . \
# Copy dependencies using windeployqt
pushd Release
+
+if [ "${TRAVIS_BRANCH}" = "prerelease" ]; then
APPNAME=Ripes-continuous-win-x86_64.zip
+else
+ APPNAME=Ripes-${TRAVIS_BRANCH}-win-x86_64.zip
+fi
+
windeployqt.exe -svg --release Ripes.exe
# Clean up some unused stuff

Implementing pushing prereleases to github