Skip to content

Commit

Permalink
ci(updater): fix bugs in git commands
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianDsg authored Apr 25, 2024
1 parent b4cca54 commit a210fdb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/update-json-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
fi
done
git add assets/**/*.json
git status
- name: creating the pull request body
Expand All @@ -49,8 +50,8 @@ jobs:
json_path="assets/**/*.json"
# capturing git diff stats and removing whitespace
diff_shortstat=$(git diff --shortstat "$json_path" | sed -re 's/^[[:blank:]]+|[[:blank:]]+$//g' -e 's/[[:blank:]]+/ /g')
diff_numstat=$(git diff --numstat "$json_path" | sed -re 's/^[[:blank:]]+|[[:blank:]]+$//g' -e 's/[[:blank:]]+/ /g')
diff_shortstat=$(git diff --staged --shortstat "$json_path" | sed -re 's/^[[:blank:]]+|[[:blank:]]+$//g' -e 's/[[:blank:]]+/ /g')
diff_numstat=$(git diff --staged --numstat "$json_path" | sed -re 's/^[[:blank:]]+|[[:blank:]]+$//g' -e 's/[[:blank:]]+/ /g')
pr_body="This pull request has been generated **automatically** to **update** the following files:\n\n\`\`\`bash\n$diff_shortstat\n\n$diff_numstat\n\`\`\`\n"
Expand Down

0 comments on commit a210fdb

Please sign in to comment.