build/sync.sh
2022-10-09 12:20:48 +02:00

77 lines
2.3 KiB
Bash

#!/bin/bash -e
# shellcheck disable=SC2250,SC2154,SC2086,SC1091,SC2312
. build/envsetup.sh
TOPDIR=$(pwd)
changelog=${TOPDIR}/changelog-${device}-${version}.md
declare -A before
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse --short HEAD)"'))
for i in "${tmp[@]}"; do
IFS=: read -r folder commit <<<"${i}"
before[${folder}]=${commit}
done
repo sync -q -c -j 6 --fail-fast --force-sync --no-tags
echo -e "# Build $(date '+%Y-%m-%d %H:%M:%S') UTC\n" >>"${changelog}"
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse --short HEAD)"'))
for i in "${tmp[@]}"; do
IFS=: read -r folder commit <<<"${i}"
if [[ "${folder}" != lineage/* && "${before[${folder}]}" != "${commit}" ]]; then
cd "${folder}" || continue
log=$(git --no-pager log --pretty=format:"- %s" "${before[${folder}]}".."${commit}")
if [[ $(echo -n "$log" | wc -l) != 0 ]]; then
{
echo "## ${folder} ${before[${folder}]}..${commit}"
echo "$log"
echo
} >>"${changelog}"
fi
cd "${TOPDIR}" || continue
fi
done
echo -e "\n" >>"${changelog}"
cat "${changelog}"
cd packages/apps/LineageParts
git am $DRONE_WORKSPACE_BASE/fix-always-enable-taskbar-toggle.patch || git am --abort
cd $TOPDIR
cd packages/apps/Trebuchet
git am $DRONE_WORKSPACE_BASE/fix-enable-more-grids-for-tablet.patch || git am --abort
cd $TOPDIR
cd packages/apps/Camera2
git am $DRONE_WORKSPACE_BASE/fix-camera2-legacy.patch || git am --abort
cd $TOPDIR
#qcom wlan
repopick 336676 336677 336678 336679 336680
cd hardware/qcom-caf/wlan
git am $DRONE_WORKSPACE_BASE/fix-qcwcn-build.patch || git am --abort
cd $TOPDIR
#qcom caf audio
cd hardware/qcom-caf/msm8974/audio
git am $DRONE_WORKSPACE_BASE/fix-audio-build.patch || git am --abort
cd $TOPDIR
#bluetooth
cd packages/modules/Bluetooth
git am $DRONE_WORKSPACE_BASE/fix-bt-1.patch || git am --abort
git am $DRONE_WORKSPACE_BASE/fix-bt-2.patch || git am --abort
git am $DRONE_WORKSPACE_BASE/fix-bt-3.patch || git am --abort
git am $DRONE_WORKSPACE_BASE/fix-bt-le.patch || git am --abort
cd $TOPDIR
#cd hardware/interfaces
#git reset --hard ad2871f7
#cd $TOPDIR
#safetynet
repopick -f 334348 -P system/core
repopick -f 334343 334344 -P frameworks/base
#health
repopick -f 338895