Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eb85548 authored by Alexandre Roux's avatar Alexandre Roux Committed by Romain Hunault
Browse files

add eng build option

parent c45bec70
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -96,6 +96,10 @@ ENV RECOVERY_IMG false
# Ship with Minimal Apps
# Ship with Minimal Apps
ENV MINIMAL_APPS false
ENV MINIMAL_APPS false


# Force an eng build even when device name doesn't contain -eng
ENV ENG_BUILD false


# You can optionally specify a USERSCRIPTS_DIR volume containing these scripts:
# You can optionally specify a USERSCRIPTS_DIR volume containing these scripts:
#  * begin.sh, run at the very beginning
#  * begin.sh, run at the very beginning
#  * before.sh, run after the syncing and patching, before starting the builds
#  * before.sh, run after the syncing and patching, before starting the builds
+4 −0
Original line number Original line Diff line number Diff line
@@ -105,6 +105,10 @@ ENV DELETE_OLD_ZIPS 0
# Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable)
# Delete old logs in $LOGS_DIR, keep only the N latest one (0 to disable)
ENV DELETE_OLD_LOGS 0
ENV DELETE_OLD_LOGS 0


# Force an eng build even when device name doesn't contain -eng
ENV ENG_BUILD false


# You can optionally specify a USERSCRIPTS_DIR volume containing these scripts:
# You can optionally specify a USERSCRIPTS_DIR volume containing these scripts:
#  * begin.sh, run at the very beginning
#  * begin.sh, run at the very beginning
#  * before.sh, run after the syncing and patching, before starting the builds
#  * before.sh, run after the syncing and patching, before starting the builds
+9 −1
Original line number Original line Diff line number Diff line
@@ -289,7 +289,15 @@ for branch in ${BRANCH_NAME//,/ }; do
        echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}"
        echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}"
        echo "Switch to Python2"
        echo "Switch to Python2"
        ln -fs /usr/bin/python2 /usr/bin/python
        ln -fs /usr/bin/python2 /usr/bin/python
        if brunch $codename &>> "$DEBUG_LOG"; then


        BRUNCH_DEVICE=${codename}

        if [ "${ENG_BUILD}" = true ]; then
          BRUNCH_DEVICE=lineage_${codename}-eng
        fi

        if brunch ${BRUNCH_DEVICE} &>> "$DEBUG_LOG"; then
          currentdate=$(date +%Y%m%d)
          currentdate=$(date +%Y%m%d)
          if [ "$builddate" != "$currentdate" ]; then
          if [ "$builddate" != "$currentdate" ]; then
            find out/target/product/$codename -maxdepth 1 -name "e-*-$currentdate-*.zip*" -type f -exec sh /root/fix_build_date.sh {} $currentdate $builddate \; &>> "$DEBUG_LOG"
            find out/target/product/$codename -maxdepth 1 -name "e-*-$currentdate-*.zip*" -type f -exec sh /root/fix_build_date.sh {} $currentdate $builddate \; &>> "$DEBUG_LOG"
+8 −1
Original line number Original line Diff line number Diff line
@@ -197,7 +197,14 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
    echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}"
    echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}"
    echo "Switch to Python2"
    echo "Switch to Python2"
    ln -fs /usr/bin/python2 /usr/bin/python
    ln -fs /usr/bin/python2 /usr/bin/python
    if brunch ${DEVICE}; then
    
    BRUNCH_DEVICE=${DEVICE}
    
    if [ "${ENG_BUILD}" = true ]; then
      BRUNCH_DEVICE=lineage_${DEVICE}-eng
    fi
    
    if brunch ${BRUNCH_DEVICE}; then
      currentdate=$(date +%Y%m%d)
      currentdate=$(date +%Y%m%d)
      if [ "$builddate" != "$currentdate" ]; then
      if [ "$builddate" != "$currentdate" ]; then
        find out/target/product/${DEVICE} -maxdepth 1 -name "e-*-$currentdate-*.zip*" -type f -exec sh /root/fix_build_date.sh {} $currentdate $builddate \;
        find out/target/product/${DEVICE} -maxdepth 1 -name "e-*-$currentdate-*.zip*" -type f -exec sh /root/fix_build_date.sh {} $currentdate $builddate \;