32 lines
960 B
Bash
32 lines
960 B
Bash
#!/bin/bash
|
|
|
|
TOPDIR=$(pwd)
|
|
changelog=${TOPDIR}/changelog-${device}-${version}.md
|
|
|
|
declare -A before
|
|
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse 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 HEAD)"'))
|
|
for i in "${tmp[@]}"; do
|
|
IFS=: read -r folder commit <<<"${i}"
|
|
if [[ "${folder}" != lineage/* && "${before[${folder}]}" != "${commit}" ]]; then
|
|
cd "${folder}" || continue
|
|
{
|
|
echo "## ${folder} ${before[${folder}]}..${commit}"
|
|
git --no-pager log --pretty=format:"- %s" "${before[${folder}]}".."${commit}"
|
|
echo
|
|
} >>"${changelog}"
|
|
cd "${TOPDIR}" || continue
|
|
fi
|
|
done
|
|
echo -e "\n" >>"${changelog}"
|
|
cat "${changelog}"
|