-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add check relax ordering on ci
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
case "$OSTYPE" in | ||
darwin*) | ||
if ! type gsed &>/dev/null || ! type ggrep &>/dev/null; then | ||
echo "GNU sed and grep not found! You can install via Homebrew" >&2 | ||
echo >&2 | ||
echo " brew install grep gnu-sed" >&2 | ||
exit 1 | ||
fi | ||
|
||
SED=gsed | ||
GREP=ggrep | ||
;; | ||
*) | ||
SED=sed | ||
GREP=grep | ||
;; | ||
esac | ||
|
||
find ./ -not -path '*/target/*' -type f -name "*.rs" | xargs grep -H "Relaxed" | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "find use Relaxed on code, please check" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters