Skip to content

Commit

Permalink
Fix broken check
Browse files Browse the repository at this point in the history
  • Loading branch information
cead22 committed Oct 31, 2024
1 parent 224b633 commit 6bdecaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/enforceRedirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ declare -r REDIRECTS_FILE="docs/redirects.csv"
hasRenamedOrDeletedArticle=false
hasModifiedRedirect=false

if git log origin/main..HEAD --name-status --pretty=format: $ARTICLES_DIRECTORY | grep -q -E "^(R|D)"
if git diff origin/main..HEAD --name-status --pretty=format: $ARTICLES_DIRECTORY | grep -q -E "^(R|D)"
then
echo "Articles have been renamed/moved/deleted"
hasRenamedOrDeletedArticle=true
fi

if git log origin/main..HEAD --name-status --pretty=format: $REDIRECTS_FILE | grep -q -E "^(M)"
if git diff origin/main..HEAD --name-status --pretty=format: $REDIRECTS_FILE | grep -q -E "^(M)"
then
echo "Redirects.csv has been modified"
hasModifiedRedirect=true
Expand Down

0 comments on commit 6bdecaf

Please sign in to comment.