mirror of
https://github.com/moparisthebest/xeps
synced 2024-08-13 16:53:48 -04:00
b028cca04d
This prevents false positives if the branch is not rebased on current main.
14 lines
452 B
Bash
Executable File
14 lines
452 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
IFS=$'\n'
|
|
filenames="$(git diff-tree -r --no-commit-id --name-status "$(git merge-base "$1" HEAD)" HEAD | ( grep -P '^[AM]\t(xep-[0-9]{4}|inbox/[^/]+)\.xml$' || true) | cut -f2)"
|
|
if [ -z "$filenames" ]; then
|
|
exit 0
|
|
fi
|
|
mkdir -p rendered-changes/
|
|
cp xmpp.css prettify.css rendered-changes/
|
|
for filename in $filenames; do
|
|
built_filename="build/${filename/%.xml/.html}"
|
|
cp "$built_filename" rendered-changes/
|
|
done
|