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
79
+
echo "Last changed files from the FILES variable:"
80
+
echo "$FILES" ; if [ -z "$FILES" ] ; then echo "Variable FILES is empty." && exit 1 ; fi
81
+
# Work on these files that have been changed in the last commit
82
+
if [ -n "$FILES" ]; then
83
+
for FILE in $FILES; do
84
+
echo "$FILE"
85
+
bash -e code/worker.sh $(readlink -f "$FILE") 2>&1 | tee log.txt
86
+
EXIT_CODE=${PIPESTATUS[0]} # bashism; get the return code of the leftmost element of the pipe
87
+
if [ $EXIT_CODE -ne 0 ]; then
88
+
echo "worker.sh exited with a non-zero code: $EXIT_CODE"
0 commit comments