Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- RELEASE="24.02"
- RELEASE_TIME="$(git --no-pager log -n 1 "${RELEASE}" --pretty=format:"%cI")"
- BG_COLOR="0D0D26"
- CAP_COLOR="FFFF99"
- CAP_FILE="coreboot_${RELEASE}.txt"
- git fetch
- git log --reverse --pretty="%ct|%an) %s" "${RELEASE}^..origin/main" >"${CAP_FILE}"
- export _GIT_BRANCH="origin/main"
- for i in {1..16}; do
- WEEK_START="$(date --date="${RELEASE_TIME} $((i - 1))week" +"%F %T %:::z")"
- WEEK_END="$(date --date="${RELEASE_TIME} ${i}week" +"%F %T %:::z")"
- FILENAME="coreboot_${RELEASE}_week_${i}"_GIT_BRANCH=main
- export _GIT_SINCE="${WEEK_START}"
- export _GIT_UNTIL="${WEEK_END}"
- #Skip weeks already accounted for
- # if [[ "$(date --date="${WEEK_END}" +%s)" -lt "$(date -d "-1week" +%s)" ]]; then
- # echo "$(date --date="${WEEK_END}" +%s) (${WEEK_END}) < last week:$(date -d "-1week" +%s) - continuing"
- # continue
- # fi
- if [[ "$(date --date="${WEEK_START}" +%s)" -ge "$(date +%s)" ]]; then
- echo "Week ${i} Start:$(date --date="$WEEK_START" +%s) (${WEEK_START}) >= today:$(date +%s) ($(date +"%F %T %:::z")) - breaking"
- break
- fi
- # Skip partial weeks
- if [[ "$(date --date="${WEEK_END}" +%s)" -ge "$(date +%s)" ]]; then
- echo "Week ${i} end:$(date --date="${WEEK_END}" +%s) (${WEEK_END}) >= today:$(date +%s) ($(date +"%F %T %:::z")) - breaking"
- break
- fi
- commits="$(git --no-pager log --reverse --pretty=format:"%h, %ci, %an, %s" "${RELEASE}^..origin/main" \
- --after="${WEEK_START}" --before="${WEEK_END}" | grep -v "mb/" )"
- if [[ -n "${commits}" ]]; then
- echo "--- Week ${i}: ${WEEK_START} to ${WEEK_END} ---"
- printf "%s\n\n\n" "${commits}"
- rm -f "${FILENAME}.mp4" "${FILENAME}.ppm"
- gource -f -1920x1080 \
- --key \
- --auto-skip-seconds 1 \
- --seconds-per-day 90 \
- --background-colour "${BG_COLOR}" \
- --logo "Documentation/coreboot_logo.png" \
- --title "coreboot ${RELEASE} week ${i}" \
- --caption-file "${CAP_FILE}" \
- --caption-colour "${CAP_COLOR}" \
- --caption-duration 8 \
- --caption-size 20 \
- --dir-font-size 15 \
- --dir-name-depth 4 \
- --max-user-speed 100 \
- --disable-bloom \
- --camera-mode overview \
- --caption-offset 1 \
- --start-date "${WEEK_START}" \
- --stop-date "${WEEK_END}" \
- --stop-at-end \
- --output-ppm-stream "${FILENAME}.ppm"
- ffmpeg \
- -y \
- -r 60 \
- -f image2pipe \
- -vcodec ppm \
- -i "${FILENAME}.ppm" \
- -vcodec libx264 \
- -preset medium \
- -pix_fmt yuv420p \
- -threads 0 \
- -bf 0 \
- "${FILENAME}.mp4"
- echo "_GIT_SINCE: ${_GIT_SINCE} _GIT_UNTIL: ${_GIT_UNTIL} _GIT_BRANCH: ${_GIT_BRANCH}"
- echo
- git-quick-stats -a
- echo
- git-quick-stats -z
- echo
- git-quick-stats -o
- echo
- git-quick-stats -w
- echo
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement