common/changed_templates.sh: store merge-base in file

This commit is contained in:
Piotr Wójcik 2021-05-24 22:13:35 +02:00 committed by Piotr
parent d06bb7e98f
commit 2dbe48e260
1 changed files with 3 additions and 1 deletions

View File

@ -8,9 +8,11 @@ elif command -v git >/dev/null 2>&1; then
GIT_CMD=$(command -v git) GIT_CMD=$(command -v git)
fi fi
printf '%s ' "$(git merge-base FETCH_HEAD HEAD)" HEAD > /tmp/revisions
/bin/echo -e '\x1b[32mChanged packages:\x1b[0m' /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'
$GIT_CMD diff-tree -r --no-renames --name-only --diff-filter=AM \ $GIT_CMD diff-tree -r --no-renames --name-only --diff-filter=AM \
"$(git merge-base FETCH_HEAD HEAD)" HEAD \ $(cat /tmp/revisions) \
-- 'srcpkgs/*/template' | -- 'srcpkgs/*/template' |
cut -d/ -f 2 | cut -d/ -f 2 |
tee /tmp/templates | tee /tmp/templates |