mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +01:00
cf9613056c
- Split the download part into a separate script to so docker keeps that step in cache and avoid redownloading it. - With API level >= 28 libiconv is not needed anymore because it's part of Android's libc. - Generate standalone toolchains to reduce the docker image size. It's also easier because it doesn't need to pass sysroot args. - Use clang compiler because gcc is deprecated in this Android NDK and will be removed in the next release.
18 lines
392 B
Bash
Executable File
18 lines
392 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
TAG="registry.gitlab.gnome.org/gnome/glib/master:v5"
|
|
|
|
docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
|
--file "Dockerfile" .
|
|
|
|
if [ "$1" = "--push" ]; then
|
|
docker login registry.gitlab.gnome.org
|
|
docker push $TAG
|
|
else
|
|
docker run --rm \
|
|
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
|
--tty --interactive "${TAG}" bash
|
|
fi
|