From 620fa099ad9ec2fa18a16e5db08db14b23157d31 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 21 Aug 2022 10:44:28 -0600 Subject: [PATCH] updated error message and fixed the test --- .github/workflows/test.yml | 2 +- diff-sha.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 111c490e..402127b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -316,7 +316,7 @@ jobs: id: changed-files-until uses: ./ with: - until: "2022-08-20" + until: "2022-08-21" - name: Show output run: | echo '${{ toJSON(steps.changed-files-until.outputs) }}' diff --git a/diff-sha.sh b/diff-sha.sh index 1de5af8c..5e7ae911 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -19,11 +19,11 @@ fi echo "Verifying git version..." -function __version() { - echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; +function __version() { + echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } -GIT_VERSION=$(git --version | awk '{print $3}'); exit_status=$? +GIT_VERSION=$(git --version | awk '{print $3}'); exit_status=$? if [[ $exit_status -ne 0 ]]; then echo "::error::git not installed" @@ -122,7 +122,6 @@ fi if [[ -n "$PREVIOUS_SHA" && -n "$CURRENT_SHA" && "$PREVIOUS_SHA" == "$CURRENT_SHA" && "$INITIAL_COMMIT" == "false" ]]; then echo "::error::Similar commit hashes detected: previous sha: $PREVIOUS_SHA is equivalent to the current sha: $CURRENT_SHA" - echo "::error::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage" exit 1 fi