add changelog
This commit is contained in:
parent
410e393f97
commit
41825856c6
11
.drone.yml
11
.drone.yml
@ -16,7 +16,7 @@ steps:
|
|||||||
- repo init -u https://github.com/LineageOS-UL/android.git -b lineage-$version
|
- repo init -u https://github.com/LineageOS-UL/android.git -b lineage-$version
|
||||||
- mkdir -p .repo/local_manifests
|
- mkdir -p .repo/local_manifests
|
||||||
- cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml
|
- cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml
|
||||||
- repo sync -q -c -j 6 --fail-fast --force-sync --no-tags
|
- bash $DRONE_WORKSPACE_BASE/sync.sh
|
||||||
volumes:
|
volumes:
|
||||||
- name: build
|
- name: build
|
||||||
path: /build
|
path: /build
|
||||||
@ -35,6 +35,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip*
|
- rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip*
|
||||||
- mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/
|
- mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/
|
||||||
|
- cat /build/changelog_${device}_${version}.md >> /http/changelog_${device}_${version}.md
|
||||||
- ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip*
|
- ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip*
|
||||||
volumes:
|
volumes:
|
||||||
- name: build
|
- name: build
|
||||||
@ -45,8 +46,8 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
image: docker.nyyu.dev/lineage/android:latest
|
image: docker.nyyu.dev/lineage/android:latest
|
||||||
commands:
|
commands:
|
||||||
- cd /build
|
- rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip
|
||||||
- rm -f out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* out/target/product/$device/lineage_$device-ota-eng.*.zip
|
- rm -f /build/changelog_${device}_${version}.md
|
||||||
volumes:
|
volumes:
|
||||||
- name: build
|
- name: build
|
||||||
path: /build
|
path: /build
|
||||||
@ -82,8 +83,8 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
image: docker.nyyu.dev/lineage/android:latest
|
image: docker.nyyu.dev/lineage/android:latest
|
||||||
commands:
|
commands:
|
||||||
- cd /http
|
- mv /http/lineage-$version-*-UNOFFICIAL-$device.zip* /publish/$version/$device/
|
||||||
- mv lineage-$version-*-UNOFFICIAL-$device.zip* /publish/$version/$device/
|
- cat /http/changelog_${device}_${version}.md >> /publish/$version/$device/changelog.md
|
||||||
- ls -lh /publish/$version/$device/
|
- ls -lh /publish/$version/$device/
|
||||||
volumes:
|
volumes:
|
||||||
- name: http
|
- name: http
|
||||||
|
31
sync.sh
Normal file
31
sync.sh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/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 [[ "${before[${folder}]}" != "${commit}" ]]; then
|
||||||
|
cd ${folder}
|
||||||
|
{
|
||||||
|
echo "## ${folder}"
|
||||||
|
git --no-pager log --pretty=format:"- %s" "${before[${folder}]}".."${commit}"
|
||||||
|
echo
|
||||||
|
} >>"${changelog}"
|
||||||
|
cd ${TOPDIR}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo -e "\n" >>"${changelog}"
|
||||||
|
cat "${changelog}"
|
Loading…
Reference in New Issue
Block a user