mirror of
https://git.proxmox.com/git/pve-eslint
synced 2025-10-04 17:23:37 +00:00
add small script to help extracting more relevant changes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
bd400de844
commit
12c851a9e0
32
debian/scripts/prepare-changes.sh
vendored
Executable file
32
debian/scripts/prepare-changes.sh
vendored
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
if [[ $1 =~ ^-(h|-help)$ ]]; then
|
||||||
|
echo "usage: $0 [<FROM-VERSION>]"
|
||||||
|
echo ""
|
||||||
|
echo "Filter out irrelevant entries (sponsors, chore, docs) from the upstream changelog."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
repo="$(git rev-parse --show-toplevel)"
|
||||||
|
|
||||||
|
cfn="$repo/changes.new.tmp"
|
||||||
|
|
||||||
|
cp "$repo/eslint/CHANGELOG.md" "$cfn"
|
||||||
|
|
||||||
|
sed -ri 's/^\* \S+ /+ /g' "$cfn"
|
||||||
|
|
||||||
|
sed -i '/ Sponsors: /d' "$cfn"
|
||||||
|
sed -i '/ Chore: /d' "$cfn"
|
||||||
|
sed -i '/ Docs: /d' "$cfn"
|
||||||
|
|
||||||
|
if [[ $1 ]]; then
|
||||||
|
version="$1"
|
||||||
|
sed -i "/^$version -/Q" "$cfn"
|
||||||
|
sed -i '/^\+ /!d' "$cfn"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv "$cfn" "$repo/changes"
|
||||||
|
|
||||||
|
echo "trimmed changes available at '$repo/changes'"
|
Loading…
Reference in New Issue
Block a user