mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-05 09:35:54 +00:00
Update get-changed-paths.sh
This commit is contained in:
parent
68f10de3ea
commit
f0fc230482
1 changed files with 4 additions and 4 deletions
|
@ -71,13 +71,13 @@ function get_diff() {
|
||||||
local filter="$3"
|
local filter="$3"
|
||||||
|
|
||||||
while IFS='' read -r sub; do
|
while IFS='' read -r sub; do
|
||||||
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
sub_commit_pre="$(git diff "$base" "$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sub_commit_cur="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
sub_commit_cur="$(git diff "$base" "$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -106,13 +106,13 @@ function get_renames() {
|
||||||
local sha="$2"
|
local sha="$2"
|
||||||
|
|
||||||
while IFS='' read -r sub; do
|
while IFS='' read -r sub; do
|
||||||
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
sub_commit_pre="$(git diff "$base" "$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sub_commit_cur="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
sub_commit_cur="$(git diff "$base" "$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue