From d37f2321937c3f085e9b290df4f7675626600fc5 Mon Sep 17 00:00:00 2001 From: Julian Xhokaxhiu Date: Sat, 21 Jan 2017 11:56:58 +0100 Subject: [PATCH] Add smart support for Local Manifests Now you can prepare them before hand, and when the build will start will take them in consideration everytime. Before you had to wait at least the first round of build to be able to add your local manifest. --- Dockerfile | 3 +++ src/build.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 272adf1..7b46449 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ MAINTAINER Julian Xhokaxhiu ENV SRC_DIR /srv/src ENV CCACHE_DIR /srv/ccache ENV OUT_DIR /srv/out +ENV LMANIFEST_DIR /src/manifest # Configurable environment variables #################################### @@ -59,6 +60,7 @@ ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" VOLUME $SRC_DIR VOLUME $CCACHE_DIR VOLUME $OUT_DIR +VOLUME $LMANIFEST_DIR # Copy required files and fix permissions ##################### @@ -71,6 +73,7 @@ COPY src/* /root/ RUN mkdir -p $SRC_DIR RUN mkdir -p $CCACHE_DIR RUN mkdir -p $OUT_DIR +RUN mkdir -p $LMANIFEST_DIR # Set the work directory ######################## diff --git a/src/build.sh b/src/build.sh index bda5d18..1469955 100644 --- a/src/build.sh +++ b/src/build.sh @@ -21,6 +21,9 @@ if ! [ -z "$DEVICE_LIST" ]; then yes | repo init -u git://github.com/lineageos/android.git -b $BRANCH_NAME 2>&1 >&$OUTPUT fi + # Copy local manifests to the appropriate folder in order take them into consideration + cp * $LMANIFEST_DIR/* $SRC_DIR/.repo/local_manifests/ + # Go to "vendor/cm" and reset it's current git status ( remove previous changes ) only if the directory exists if [ -d "vendor/cm" ]; then cd vendor/cm