1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-09-20 12:22:40 +02:00

Hook into one common makefile to inject the OTA URL

And make sure the source stays clean for the next repo sync
This commit is contained in:
Julian Xhokaxhiu 2017-01-08 19:28:32 +01:00
parent 53c7778701
commit d5b1deadbe

View File

@ -4,11 +4,6 @@
#
###########################################################
# Set a custom updater URI if a OTA URL is provided
if ! [ -z "$OTA_URL" ]; then
export ADDITIONAL_DEFAULT_PROPERTIES="cm.updater.uri=$OTA_URL"
fi
if ! [ -z "$DEVICE_LIST" ]; then
# If the source directory is empty
@ -17,6 +12,13 @@ if ! [ -z "$DEVICE_LIST" ]; then
yes | repo init -u git://github.com/lineageos/android.git -b $BRANCH_NAME
fi
# 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
git reset --hard
cd $SRC_DIR
fi
# Sync the source code
repo sync
@ -28,6 +30,11 @@ if ! [ -z "$DEVICE_LIST" ]; then
# Prepare the environment
source build/envsetup.sh
# Set a custom updater URI if a OTA URL is provided
if ! [ -z "$OTA_URL" ]; then
sed -i "1s;^;ADDITIONAL_DEFAULT_PROPERTIES += cm.updater.uri=$OTA_URL\n\n;" vendor/cm/config/common.mk
fi
# Cycle DEVICE_LIST environment variable, to know which one may be executed next
IFS=','
for codename in $DEVICE_LIST; do