mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 17:46:29 +09:00
workflows/check-cherry-picks: fix silent failure (#411476)
This commit is contained in:
commit
d748458da0
1 changed files with 9 additions and 6 deletions
|
@ -1,16 +1,23 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Find alleged cherry-picks
|
# Find alleged cherry-picks
|
||||||
|
|
||||||
set -e
|
set -eo pipefail
|
||||||
|
|
||||||
if [ $# != "2" ] ; then
|
if [ $# != "2" ] ; then
|
||||||
echo "usage: check-cherry-picks.sh base_rev head_rev"
|
echo "usage: check-cherry-picks.sh base_rev head_rev"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Make sure we are inside the nixpkgs repo, even when called from outside
|
||||||
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
PICKABLE_BRANCHES=${PICKABLE_BRANCHES:-master staging release-??.?? staging-??.??}
|
PICKABLE_BRANCHES=${PICKABLE_BRANCHES:-master staging release-??.?? staging-??.??}
|
||||||
problem=0
|
problem=0
|
||||||
|
|
||||||
|
commits="$(git rev-list \
|
||||||
|
-E -i --grep="cherry.*[0-9a-f]{40}" --reverse \
|
||||||
|
"$1..$2")"
|
||||||
|
|
||||||
while read new_commit_sha ; do
|
while read new_commit_sha ; do
|
||||||
if [ -z "$new_commit_sha" ] ; then
|
if [ -z "$new_commit_sha" ] ; then
|
||||||
continue # skip empty lines
|
continue # skip empty lines
|
||||||
|
@ -88,10 +95,6 @@ while read new_commit_sha ; do
|
||||||
echo "$original_commit_sha not found in any pickable branch"
|
echo "$original_commit_sha not found in any pickable branch"
|
||||||
|
|
||||||
problem=1
|
problem=1
|
||||||
done <<< "$(
|
done <<< "$commits"
|
||||||
git rev-list \
|
|
||||||
-E -i --grep="cherry.*[0-9a-f]{40}" --reverse \
|
|
||||||
"$1..$2"
|
|
||||||
)"
|
|
||||||
|
|
||||||
exit $problem
|
exit $problem
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue