build/sync.sh
2022-12-23 11:02:27 +01:00

56 lines
1.8 KiB
Bash

#!/bin/bash -e
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}"
. build/envsetup.sh
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
cd frameworks/av
git am $DRONE_WORKSPACE_BASE/fix-rear-camera-rotation.patch || git am --abort
cd $TOPDIR
repopick -t twelve-colors -i -r
cd frameworks/base
git reset --hard losul/lineage-19.1
cd $TOPDIR
repopick -P frameworks/base -r 336824 336825 336826 336827 336828 336829 336830 336831 336832 336833 336834 336835 336836
repopick -f 333534 -P system/core
repopick -f 329229 329230 -P frameworks/base