subsurface/scripts/android/before_install.sh
Jan Mulder 63498df1bc Android Docker: give the docker build its own output tree
Again, this is relevant for developers that do local docker android
builds, and normal android builds. A normal build uses the directory
subsurface-mobile-build-arm(64), and when doing a docker android build
this directory is shared between host and container. That sharing is
good, as it nicely exposes the build tree to the host (for easy compare,
inspection, etc.). But reusing the same tree as the local one is
inconvenient (and possibly dangerous due to all kinds of caching
issues).

So, give the docker build its own output tree for the shared
subsurface-mobile-build-arm(64) build output.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30 11:20:34 -08:00

23 lines
866 B
Bash

#!/bin/bash
# Travis only pulls shallow repos. But that messes with git describe.
# Sorry Travis, fetching the whole thing and the tags as well...
git fetch --unshallow
git pull --tags
git describe
# setup build dir on the host, not inside of the container
mkdir -p ../subsurface-mobile-build-docker-arm
mkdir -p ../subsurface-mobile-build-docker-arm64
# this uses a custom built Ubuntu image that includes Qt for Android and
# Android NDK/SDK
# Running sleep to keep the container running during the build
PARENT="$( cd .. && pwd )"
docker run -v $PWD:/android/subsurface \
-v $PARENT/subsurface-mobile-build-docker-arm:/android/subsurface-mobile-build-arm \
-v $PARENT/subsurface-mobile-build-docker-arm64:/android/subsurface-mobile-build-arm64 \
--name=android-builder \
-w /android \
-d dirkhh/android-builder:5.12.02 \
/bin/sleep 60m