total rebase
[anni] / tools / check-changelog
1 #!/bin/sh
2
3 echo "looking for change log"
4
5 git remote add upstream https://git.pleroma.social/pleroma/pleroma.git
6 git fetch upstream ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}:refs/remotes/upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
7
8 git diff --raw --no-renames upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD -- changelog.d | \
9     grep ' A\t' | grep '\.\(skip\|add\|remove\|fix\|security\|change\)$'
10 ret=$?
11
12 if [ $ret -eq 0 ]; then
13     echo "found a changelog entry"
14     exit 0
15 else
16     echo "changelog entry not found"
17     exit 1
18 fi