build/sync.sh

94 lines
2.7 KiB
Bash
Raw Normal View History

2022-09-18 12:17:53 +02:00
#!/bin/bash -e
2022-09-30 22:42:14 +02:00
# shellcheck disable=SC2250,SC2154,SC2086,SC1091,SC2312
2022-09-18 12:17:53 +02:00
2022-12-08 22:34:08 +01:00
if [[ -z "$CI_WORKSPACE" ]]; then
CI_WORKSPACE=$DRONE_WORKSPACE_BASE
fi
2022-08-22 17:51:08 +02:00
TOPDIR=$(pwd)
2023-01-07 01:08:26 +01:00
changelog=${TOPDIR}/changelog-mondrian-${version}.md
2022-08-22 17:51:08 +02:00
declare -A before
2023-01-07 01:08:26 +01:00
if [[ -f gitstate-mondrian-${version}.txt ]]
then
2023-03-26 12:28:30 +02:00
read -a tmp < gitstate-mondrian-${version}.txt
2023-01-07 01:08:26 +01:00
else
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse --short HEAD)"'))
fi
2022-08-22 17:51:08 +02:00
for i in "${tmp[@]}"; do
IFS=: read -r folder commit <<<"${i}"
before[${folder}]=${commit}
done
2023-05-19 15:13:29 +02:00
repo sync -q -c -j 6 --fail-fast --force-sync --no-tags || repo sync -q -c -j 6 --fail-fast --force-sync --no-tags || exit 1
2022-08-22 17:51:08 +02:00
2023-01-07 01:08:26 +01:00
echo -e "# Build $(date '+%Y-%m-%d %H:%M:%S %Z')\n" >>"${changelog}"
2022-09-27 08:44:32 +02:00
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse --short HEAD)"'))
2023-01-07 01:08:26 +01:00
echo "${tmp[@]}" > gitstate-mondrian-${version}.tmp.txt
2022-09-27 08:44:32 +02:00
for i in "${tmp[@]}"; do
IFS=: read -r folder commit <<<"${i}"
if [[ "${folder}" != lineage/* && "${before[${folder}]}" != "${commit}" ]]; then
cd "${folder}" || continue
2022-09-30 22:42:14 +02:00
log=$(git --no-pager log --pretty=format:"- %s" "${before[${folder}]}".."${commit}")
2022-12-23 11:01:49 +01:00
if [[ $(echo -n "$log" | wc -c) != 0 ]]; then
2022-09-30 22:42:14 +02:00
{
echo "## ${folder} ${before[${folder}]}..${commit}"
echo "$log"
echo
} >>"${changelog}"
fi
2022-09-27 08:44:32 +02:00
cd "${TOPDIR}" || continue
fi
done
cat "${changelog}"
2023-01-07 10:57:41 +01:00
cd build/tools
git am $CI_WORKSPACE/fix-store-build-prop-zip.patch || git am --abort
cd $TOPDIR
2023-01-07 01:08:26 +01:00
2022-09-18 12:17:53 +02:00
cd packages/apps/LineageParts
2022-12-08 22:34:08 +01:00
git am $CI_WORKSPACE/fix-always-enable-taskbar-toggle.patch || git am --abort
2022-09-18 12:17:53 +02:00
cd $TOPDIR
cd packages/apps/Trebuchet
2022-12-08 22:34:08 +01:00
git am $CI_WORKSPACE/fix-enable-more-grids-for-tablet.patch || git am --abort
2022-12-25 13:59:05 +01:00
git am $CI_WORKSPACE/fix-trebuchet-taskbar.patch || git am --abort
2022-09-18 12:17:53 +02:00
cd $TOPDIR
2022-09-25 14:45:49 +02:00
2022-09-30 22:42:14 +02:00
#bluetooth
cd packages/modules/Bluetooth
2023-04-01 08:45:58 +02:00
#git am $CI_WORKSPACE/fix-bt-1.patch || git am --abort
#git am $CI_WORKSPACE/fix-bt-2.patch || git am --abort
#git am $CI_WORKSPACE/fix-bt-3.patch || git am --abort
2022-12-08 22:34:08 +01:00
git am $CI_WORKSPACE/fix-bt-le.patch || git am --abort
2022-09-30 22:42:14 +02:00
cd $TOPDIR
2022-12-02 21:47:38 +01:00
#connectivity
2022-12-25 22:36:46 +01:00
cd packages/modules/Connectivity
git am $CI_WORKSPACE/fix-NetworkStats-disable-BPF.patch || git am --abort
cd $TOPDIR
2022-12-02 21:47:38 +01:00
2022-12-04 10:40:15 +01:00
#av
cd frameworks/av
2022-12-08 22:34:08 +01:00
git am $CI_WORKSPACE/fix-rear-camera-rotation.patch || git am --abort
2022-12-04 10:40:15 +01:00
cd $TOPDIR
2022-09-25 14:45:49 +02:00
#safetynet
2022-12-25 20:51:09 +01:00
cd system/core
#334348
git am $CI_WORKSPACE/snet20-1.patch || git am --abort
cd $TOPDIR
cd frameworks/base
#334343 334344
git am $CI_WORKSPACE/snet20-2.patch || git am --abort
git am $CI_WORKSPACE/snet20-3.patch || git am --abort
2023-01-09 21:44:06 +01:00
git am $CI_WORKSPACE/microg.patch || git am --abort
2022-12-25 20:51:09 +01:00
cd $TOPDIR
2023-05-19 15:14:31 +02:00
cd hardware/qcom-caf/wlan
git reset --hard e0f934b
cd $TOPDIR
2022-12-25 20:51:09 +01:00
#. build/envsetup.sh
#repopick