-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix false positive in checking generated servers (#260)
- Loading branch information
1 parent
3308838
commit dc01c95
Showing
6 changed files
with
35 additions
and
40 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 |
---|---|---|
|
@@ -35,6 +35,8 @@ jobs: | |
# Cache only the cargo registry | ||
cache-targets: false | ||
- uses: mozilla-actions/[email protected] | ||
- name: git file permission config | ||
run: git config --global --add safe.directory '*' | ||
- name: Check fmt | ||
run: make check-fmt | ||
- name: Check clippy | ||
|
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
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
#!/usr/bin/env bash | ||
# Script to check a generated server has not changed | ||
|
||
server_dir=$1 | ||
server_gen_cmd=$2 | ||
|
||
DIR=$(dirname $0) | ||
cd "$DIR/.." | ||
|
||
# First generate | ||
$server_gen_cmd > /dev/null | ||
|
||
# Check if anything changed, the README contains a generation date, ignore that file. | ||
status=$(git status --porcelain $server_dir) | ||
if [ $? -ne 0 ] | ||
then | ||
echo "Failed to get git status" | ||
exit 1 | ||
fi | ||
|
||
changes=$(echo "$status" | grep -v README.md) | ||
if [[ -n "$changes" ]] | ||
then | ||
echo "Found ${server_dir} changes:" | ||
echo "$changes" | ||
exit 1 | ||
fi | ||
echo "Generated ${server_dir} is up-to-date" | ||
exit 0 |
This file was deleted.
Oops, something went wrong.
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