Skip to content

Commit

Permalink
Feat: check makemessages (#2155)
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran authored Jun 11, 2024
2 parents 13c9b03 + 798aa83 commit efcebc8
Showing 1 changed file with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Check for up-to-date Django migrations
name: Check for up-to-date Django migrations and messages
on: [push, pull_request]

jobs:
check-makemigrations:
check-migrations-and-messages:
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -26,7 +26,23 @@ jobs:
run: |
if ./bin/makemigrations.sh | grep -q 'No changes detected';
then
exit 0;
exit 0;
else
exit 1;
exit 1;
fi
- name: Run ./bin/makemessages.sh
run: |
./bin/makemessages.sh
set -x # show commands
git add benefits
# message files are up-to-date if the only differences are from the updated timestamp
if echo $(git diff --cached --shortstat) | grep -q '2 files changed, 2 insertions(+), 2 deletions(-)';
then
exit 0;
else
exit 1;
fi

0 comments on commit efcebc8

Please sign in to comment.