build/sync.sh

51 lines
1.6 KiB
Bash
Raw Normal View History

2022-09-18 12:17:53 +02:00
#!/bin/bash -e
. build/envsetup.sh
2022-08-22 17:51:08 +02:00
TOPDIR=$(pwd)
2022-08-22 22:55:41 +02:00
changelog=${TOPDIR}/changelog-${device}-${version}.md
2022-08-22 17:51:08 +02:00
declare -A before
2022-09-03 13:41:51 +02:00
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse --short HEAD)"'))
2022-08-22 17:51:08 +02:00
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
2022-09-18 12:17:53 +02:00
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
2022-09-25 14:44:19 +02:00
cd packages/apps/Camera2
git am $DRONE_WORKSPACE_BASE/fix-camera2-legacy.patch || git am --abort
cd $TOPDIR
2022-09-18 12:17:53 +02:00
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
2022-09-25 14:44:19 +02:00
repopick -f 333534 -P system/core
repopick -f 329229 329230 -P frameworks/base
2022-09-18 12:17:53 +02:00
2022-08-22 17:51:08 +02:00
echo -e "# Build $(date '+%Y-%m-%d %H:%M:%S') UTC\n" >>"${changelog}"
2022-09-03 13:41:51 +02:00
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse --short HEAD)"'))
2022-08-22 17:51:08 +02:00
for i in "${tmp[@]}"; do
IFS=: read -r folder commit <<<"${i}"
2022-08-22 21:15:44 +02:00
if [[ "${folder}" != lineage/* && "${before[${folder}]}" != "${commit}" ]]; then
cd "${folder}" || continue
2022-08-22 17:51:08 +02:00
{
2022-09-03 13:34:13 +02:00
echo "## ${folder} ${before[${folder}]}..${commit}"
2022-08-22 17:51:08 +02:00
git --no-pager log --pretty=format:"- %s" "${before[${folder}]}".."${commit}"
echo
} >>"${changelog}"
2022-08-22 21:15:44 +02:00
cd "${TOPDIR}" || continue
2022-08-22 17:51:08 +02:00
fi
done
echo -e "\n" >>"${changelog}"
cat "${changelog}"