summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-11-01 00:43:35 +0000
committertusooa <tusooa@kazv.moe>2023-11-01 00:43:35 +0000
commit6f654d534a1a606185c4f3543e7b1552f0a20566 (patch)
treeec8b787417a236aca411f0697465caf51d2b61ed /tools
parentf966abe4fbacf8fa91cf2b533f8abfb57d62f8b7 (diff)
parentad45b06b3f1d7dd4157a3fbc44dc1d2f07c98f35 (diff)
downloadpleroma-6f654d534a1a606185c4f3543e7b1552f0a20566.tar.gz
pleroma-6f654d534a1a606185c4f3543e7b1552f0a20566.zip
Merge branch 'release/2.6.0' into 'stable'
Release/2.6.0 See merge request pleroma/pleroma!3924
Diffstat (limited to 'tools')
-rw-r--r--tools/check-changelog18
-rwxr-xr-xtools/collect-changelog27
2 files changed, 45 insertions, 0 deletions
diff --git a/tools/check-changelog b/tools/check-changelog
new file mode 100644
index 000000000..60692033f
--- /dev/null
+++ b/tools/check-changelog
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+echo "looking for change log"
+
+git remote add upstream https://git.pleroma.social/pleroma/pleroma.git
+git fetch upstream ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}:refs/remotes/upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
+
+git diff --raw --no-renames upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD -- changelog.d | \
+ grep ' A\t' | grep '\.\(skip\|add\|remove\|fix\|security\)$'
+ret=$?
+
+if [ $ret -eq 0 ]; then
+ echo "found a changelog entry"
+ exit 0
+else
+ echo "changelog entry not found"
+ exit 1
+fi
diff --git a/tools/collect-changelog b/tools/collect-changelog
new file mode 100755
index 000000000..1e12d5640
--- /dev/null
+++ b/tools/collect-changelog
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+collectType() {
+ local suffix="$1"
+ local header="$2"
+ local printed=0
+ for file in changelog.d/*."$suffix"; do
+ if [ '!' -f "$file" ]; then
+ continue
+ fi
+ if [ "$printed" = 0 ]; then
+ echo
+ echo "### $header"
+ printed=1
+ fi
+ # Normalize any trailing newlines/spaces, etc.
+ echo "- $(cat "$file")"
+ done
+}
+
+collectType security Security
+collectType change Changed
+collectType add Added
+collectType fix Fixed
+collectType remove Removed
+
+rm changelog.d/*