mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
ci/check-cherry-picks: set -u
This commit is contained in:
parent
4c345b2fb4
commit
30600ac6d1
1 changed files with 6 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Find alleged cherry-picks
|
# Find alleged cherry-picks
|
||||||
|
|
||||||
set -eo pipefail
|
set -euo 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"
|
||||||
|
@ -20,7 +20,7 @@ remote="$(git remote -v | grep -i 'NixOS/nixpkgs' | head -n1 | cut -f1 || true)"
|
||||||
commits="$(git rev-list --reverse "$1..$2")"
|
commits="$(git rev-list --reverse "$1..$2")"
|
||||||
|
|
||||||
while read -r new_commit_sha ; do
|
while read -r new_commit_sha ; do
|
||||||
if [ "$GITHUB_ACTIONS" = 'true' ] ; then
|
if [ -v GITHUB_ACTIONS ] ; then
|
||||||
echo "::group::Commit $new_commit_sha"
|
echo "::group::Commit $new_commit_sha"
|
||||||
else
|
else
|
||||||
echo "================================================="
|
echo "================================================="
|
||||||
|
@ -34,7 +34,7 @@ while read -r new_commit_sha ; do
|
||||||
| grep -Eoi -m1 '[0-9a-f]{40}' || true
|
| grep -Eoi -m1 '[0-9a-f]{40}' || true
|
||||||
)
|
)
|
||||||
if [ -z "$original_commit_sha" ] ; then
|
if [ -z "$original_commit_sha" ] ; then
|
||||||
if [ "$GITHUB_ACTIONS" = 'true' ] ; then
|
if [ -v GITHUB_ACTIONS ] ; then
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
echo -n "::error ::"
|
echo -n "::error ::"
|
||||||
else
|
else
|
||||||
|
@ -72,7 +72,7 @@ while read -r new_commit_sha ; do
|
||||||
'
|
'
|
||||||
|
|
||||||
if $range_diff_common --no-color 2> /dev/null | grep -E '^ {4}[+-]{2}' > /dev/null ; then
|
if $range_diff_common --no-color 2> /dev/null | grep -E '^ {4}[+-]{2}' > /dev/null ; then
|
||||||
if [ "$GITHUB_ACTIONS" = 'true' ] ; then
|
if [ -v GITHUB_ACTIONS ] ; then
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
echo -n "::warning ::"
|
echo -n "::warning ::"
|
||||||
else
|
else
|
||||||
|
@ -88,7 +88,7 @@ while read -r new_commit_sha ; do
|
||||||
else
|
else
|
||||||
echo " ✔ $original_commit_sha highly similar to $new_commit_sha"
|
echo " ✔ $original_commit_sha highly similar to $new_commit_sha"
|
||||||
$range_diff_common --color
|
$range_diff_common --color
|
||||||
[ "$GITHUB_ACTIONS" = 'true' ] && echo ::endgroup::
|
[ -v GITHUB_ACTIONS ] && echo ::endgroup::
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# move on to next commit
|
# move on to next commit
|
||||||
|
@ -97,7 +97,7 @@ while read -r new_commit_sha ; do
|
||||||
done <<< "$branches"
|
done <<< "$branches"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$GITHUB_ACTIONS" = 'true' ] ; then
|
if [ -v GITHUB_ACTIONS ] ; then
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
echo -n "::error ::"
|
echo -n "::error ::"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue