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