1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore: fix small issues in deployment scripts and add debug mode

This commit is contained in:
sudden6 2018-07-13 15:58:57 +02:00 committed by Anthony Bilinski
parent 90171366bd
commit b0ae312402
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
3 changed files with 55 additions and 14 deletions

View File

@ -22,8 +22,15 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE. # THE SOFTWARE.
# usage: ./appimage/build-appimage.sh [Debug]
#
# If [Debug] is set to "Debug" the container will run in interactive mode and
# stay open to poke around in the filesystem.
+set -exo pipefail readonly DEBUG="$1"
# Fail out on error
set -exo pipefail
# This script should be run from the root of the repository # This script should be run from the root of the repository
@ -38,11 +45,23 @@ fi
mkdir -p ./output mkdir -p ./output
if [ "$DEBUG" == "Debug" ]
then
echo "Execute: /qtox/appimage/build.sh to start the build script"
echo "Execute: exit to leave the container"
docker run --rm -it \
-v $PWD:/qtox \
-v $PWD/output:/output \
debian:stretch-slim \
/bin/bash
else
docker run --rm \ docker run --rm \
-v $PWD:/qtox \ -v $PWD:/qtox \
-v $PWD/output:/output \ -v $PWD/output:/output \
debian:stretch-slim \ debian:stretch-slim \
/bin/bash -c "/qtox/appimage/build.sh" /bin/bash -c "/qtox/appimage/build.sh"
fi
# use the version number in the name when building a tag on Travis CI # use the version number in the name when building a tag on Travis CI
if [ -n "$TRAVIS_TAG" ] if [ -n "$TRAVIS_TAG" ]

View File

@ -6,6 +6,16 @@
# #
# This script should be run from the root of the repository # This script should be run from the root of the repository
# usage: ./flatpak/build-flatpak.sh [Debug]
#
# If [Debug] is set to "Debug" the container will run in interactive mode and
# stay open to poke around in the filesystem.
readonly DEBUG="$1"
# Fail out on error
set -exo pipefail
if [ ! -f ./flatpak/build-flatpak.sh ]; then if [ ! -f ./flatpak/build-flatpak.sh ]; then
echo "" echo ""
echo "You are attempting to run the build-flatpak.sh from a wrong directory." echo "You are attempting to run the build-flatpak.sh from a wrong directory."
@ -17,11 +27,23 @@ fi
mkdir -p ./output mkdir -p ./output
if [ "$DEBUG" == "Debug" ]
then
echo "Execute: /qtox/appimage/build.sh to start the build script"
echo "Execute: exit to leave the container"
docker run --rm --privileged -it \
-v $PWD:/qtox \
-v $PWD/output:/output \
debian:stretch-slim \
/bin/bash
else
docker run --rm --privileged \ docker run --rm --privileged \
-v $PWD:/qtox \ -v $PWD:/qtox \
-v $PWD/output:/output \ -v $PWD/output:/output \
debian:stretch-slim \ debian:stretch-slim \
/bin/bash -c "/qtox/flatpak/build.sh" /bin/bash -c "/qtox/flatpak/build.sh"
fi
# use the version number in the name when building a tag on Travis CI # use the version number in the name when building a tag on Travis CI
if [ -n "$TRAVIS_TAG" ] if [ -n "$TRAVIS_TAG" ]

View File

@ -26,7 +26,7 @@ echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/source
# Get packages # Get packages
apt-get update apt-get update
apt-get install $APT_FLAGS ca-certificates git elfutils wget xz-utils patch apt-get install $APT_FLAGS ca-certificates git elfutils wget xz-utils patch bzip2
# install recent flatpak packages # install recent flatpak packages
apt-get install $APT_FLAGS -t stretch-backports flatpak flatpak-builder apt-get install $APT_FLAGS -t stretch-backports flatpak flatpak-builder