mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
Merge branch 'cooker' into feat/okonomiyaki
This commit is contained in:
commit
8a220cd3a0
25
developer_toolbox/hooks/pre-commit
Executable file
25
developer_toolbox/hooks/pre-commit
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
# A pre-commit hook to lint features.json if it is edited
|
||||
|
||||
# Check if any path contains 'features.json'
|
||||
if git diff --cached --name-only | grep -q 'config/retrodeck/reference_lists/features.json'; then
|
||||
# Run the linting script
|
||||
echo "Linting config/retrodeck/reference_lists/features.json..."
|
||||
if ! bash developer_toolbox/lint_features.json.sh; then
|
||||
echo "Linting failed. Please fix the issues and try again."
|
||||
exit 1 # Exit with a non-zero status to block the commit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Lint Manifest
|
||||
# if git diff --cached --name-only | grep -q 'net.retrodeck.retrodeck.yml'; then
|
||||
# # Run the linting script
|
||||
# echo "Linting net.retrodeck.retrodeck.yml..."
|
||||
# if ! bash developer_toolbox/lint_manifest.sh; then
|
||||
# echo "Linting failed. Please fix the issues and try again."
|
||||
# exit 1 # Exit with a non-zero status to block the commit
|
||||
# fi
|
||||
# fi
|
||||
|
||||
# Continue with the commit if all checks passed
|
||||
exit 0
|
4
developer_toolbox/install_hooks.sh
Executable file
4
developer_toolbox/install_hooks.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p .git/hooks
|
||||
cp -f developer_toolbox/hooks/* .git/hooks
|
3
developer_toolbox/lint_manifest.sh
Executable file
3
developer_toolbox/lint_manifest.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
yamllint net.retrodeck.retrodeck.yml
|
Loading…
Reference in a new issue