build/sync.sh
nyyu 9eb9627de2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
upd patches
2022-12-25 22:24:32 +01:00

80 lines
2.3 KiB
Bash

#!/bin/bash -e
# shellcheck disable=SC2250,SC2154,SC2086,SC1091,SC2312
if [[ -z "$CI_WORKSPACE" ]]; then
CI_WORKSPACE=$DRONE_WORKSPACE_BASE
fi
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 -c) != 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 $CI_WORKSPACE/fix-always-enable-taskbar-toggle.patch || git am --abort
cd $TOPDIR
cd packages/apps/Trebuchet
git am $CI_WORKSPACE/fix-enable-more-grids-for-tablet.patch || git am --abort
git am $CI_WORKSPACE/fix-trebuchet-taskbar.patch || git am --abort
cd $TOPDIR
#bluetooth
cd packages/modules/Bluetooth
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
git am $CI_WORKSPACE/fix-bt-le.patch || git am --abort
cd $TOPDIR
#connectivity
#cd packages/modules/Connectivity
#git am $CI_WORKSPACE/fix-NetworkStats-disable-BPF.patch || git am --abort
#cd $TOPDIR
#av
cd frameworks/av
git am $CI_WORKSPACE/fix-rear-camera-rotation.patch || git am --abort
cd $TOPDIR
#safetynet
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
cd $TOPDIR
#. build/envsetup.sh
#repopick