You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Finds wrong files in PRs! # FILES=$(git log -1 --name-status --diff-filter=AR --pretty=format: -- data/ | awk '/^A/ || /^R/ {file=$2} END {print file}') # Most recent addition or renaming within the last commit
69
-
echo "Last changed files from the FILES variable:"
70
-
echo "$FILES" ; if [ -z "$FILES" ] ; then echo "Variable FILES is empty." && exit 1 ; fi
71
-
# Work on these files that have been changed in the last commit
72
-
if [ -n "$FILES" ]; then
73
-
for FILE in $FILES; do
74
-
echo "$FILE"
75
-
bash -e code/worker.sh $(readlink -f "$FILE") 2>&1 | tee log.txt
76
-
EXIT_CODE=${PIPESTATUS[0]} # bashism; get the return code of the leftmost element of the pipe
77
-
if [ $EXIT_CODE -ne 0 ]; then
78
-
echo "worker.sh exited with a non-zero code: $EXIT_CODE"
# Finds wrong files in PRs! # FILES=$(git log -1 --name-status --diff-filter=AR --pretty=format: -- data/ | awk '/^A/ || /^R/ {file=$2} END {print file}') # Most recent addition or renaming within the last commit
73
+
echo "Last changed files from the FILES variable:"
74
+
echo "$FILES" ; if [ -z "$FILES" ] ; then echo "Variable FILES is empty." && exit 1 ; fi
75
+
# Work on these files that have been changed in the last commit
76
+
if [ -n "$FILES" ]; then
77
+
for FILE in $FILES; do
78
+
echo "$FILE"
79
+
bash -e code/worker.sh $(readlink -f "$FILE") 2>&1 | tee log.txt
80
+
EXIT_CODE=${PIPESTATUS[0]} # bashism; get the return code of the leftmost element of the pipe
81
+
if [ $EXIT_CODE -ne 0 ]; then
82
+
echo "worker.sh exited with a non-zero code: $EXIT_CODE"
0 commit comments