Skip to content

Commit

Permalink
Merge pull request #7 from creative-commoners/pulls/1.0/git-diff-cached
Browse files Browse the repository at this point in the history
FIX Only use git diff
  • Loading branch information
GuySartorelli authored Jul 19, 2022
2 parents 3558e15 + c673884 commit ddba039
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,11 @@ runs:
echo "Running yarn build"
yarn run build
echo "Running git diff"
GIT_DIFF_FILES=$(git diff-files --ignore-all-space --relative=client)
GIT_DIFF=$(git diff --name-status --relative=client)
if [[ $GIT_DIFF_FILES != "" ]]; then
echo "git diff files:"
echo $GIT_DIFF_FILES
fi
git add .
GIT_DIFF=$(git diff --name-status --relative=client && git diff --cached --name-status --relative=client)
if [[ $GIT_DIFF != "" ]]; then
echo "git diff:"
echo $GIT_DIFF
fi
if [[ $GIT_DIFF_FILES != "" ]] || [[ $GIT_DIFF != "" ]]; then
exit 1
fi
fi
Expand Down

0 comments on commit ddba039

Please sign in to comment.