-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiff-accdb-files.sh
More file actions
executable file
·20 lines (17 loc) · 905 Bytes
/
diff-accdb-files.sh
File metadata and controls
executable file
·20 lines (17 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
HEAD=$1 #expects to be passed a valid commit HEAD as the first parameter.
BASE=$2
# gets the names of accdb files that have been modified in the given commit
# and then pipes that into a custom diff script.
{
$GITHUB_ACTION_PATH/list-accdb-files.sh $HEAD M | while read -r f ;
do
git difftool --extcmd="$GITHUB_ACTION_PATH/diff-modified-accdb-file.sh" "$BASE" "$f" --no-prompt \
| jq -s --join-output --compact-output --arg filename "$f" --raw-input '. | { name: $filename, text: . }'
done
$GITHUB_ACTION_PATH/list-accdb-files.sh $HEAD A | while read -r f ;
do
git difftool --extcmd="$GITHUB_ACTION_PATH/diff-added-accdb-file.sh" "$BASE" "$f" --no-prompt \
| jq -s --join-output --compact-output --arg filename "$f" --raw-input '. | { name: $filename, text: . }'
done
} | jq --join-output --compact-output --slurp '. | { files: . }'