~starkingdoms/starkingdoms

ref: 9df232b1f4ecc59120b4cc7cb993bed6aa5edb81 starkingdoms/.git-hooks/pre-commit -rwxr-xr-x 500 bytes
9df232b1 — core Merge branch 'bevy_rewrite' of gitlab.com:starkingdoms.tk/starkingdoms.tk into bevy_rewrite 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
echo "Checking your formatting..."
rustfmt server/src/*.rs --edition 2021 --check
if [ $? -ne 0 ]; then
  echo "Uh oh, looks like your formatting is off! Run 'rustfmt server/src/*.rs --edition 2021' to fix it."
  exit 1
fi
cd starkingdoms-client && yarn prettier . --check
if [ $? -ne 0 ]; then
  echo "Uh oh, looks like your formatting is off! Run 'cd starkingdoms-client && yarn prettier . --write' to fix it."
  exit 1
fi
echo "Everything looks good! Proceeding with commit..."
exit 0