3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 03:47:20 +00:00

Updated diff-sha.sh

This commit is contained in:
Tonye Jack 2022-10-15 16:26:42 -06:00
parent 4f38efcb15
commit 61ed208946

View file

@ -79,6 +79,10 @@ if [[ -z $GITHUB_BASE_REF ]]; then
echo "::debug::Getting base SHA for '$INPUT_SINCE'..."
PREVIOUS_SHA=$(git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse | head -n 1)
git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse | grep -n "$PREVIOUS_SHA"
git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse
if [[ -z "$PREVIOUS_SHA" ]]; then
echo "::error::Unable to locate a previous commit for the specified date: $INPUT_SINCE"
exit 1