Skip to content

Commit

Permalink
Merge pull request #6 from creative-commoners/pulls/1.0/git-diff
Browse files Browse the repository at this point in the history
FIX Output git diff
  • Loading branch information
GuySartorelli authored Jul 19, 2022
2 parents f71d52d + af95bba commit 3558e15
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,23 @@ runs:
npm install -g yarn;
fi
yarn install --network-concurrency 1
if [[ $(cat package.json | jq -r '.scripts.build') != 'null' ]]; then
if [[ $(cat package.json | jq -r '.scripts.build') != 'null' ]]; then
echo "Running yarn build"
yarn run build
echo "Running git diff"
git diff-files --quiet -w --relative=client
git diff --name-status --relative=client
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
if [[ $GIT_DIFF != "" ]]; then
echo "git diff:"
echo $GIT_DIFF
fi
if [[ $GIT_DIFF_FILES != "" ]] || [[ $GIT_DIFF != "" ]]; then
exit 1
fi
fi
if [[ $(cat package.json | jq -r '.scripts.test') != 'null' ]]; then
echo "Running yarn test"
Expand Down

0 comments on commit 3558e15

Please sign in to comment.