kopia lustrzana https://github.com/OpenDroneMap/ODM
Added pre-commit hook to check that ccd_defs.json compiles.
Enable this hook by creating a symlink to .git/hooks/
Former-commit-id: f4252ad4e1
gh-pages
rodzic
2f3dbcbafb
commit
75bb4ba4a6
|
@ -308,6 +308,6 @@
|
|||
"SONY SLT-A77 II": 23.5,
|
||||
"SONY SLT-A77V": 23.5,
|
||||
"SONY SLT-A99": 35.8,
|
||||
"Vexcel UltraCam": 28.00,
|
||||
"Vexcel UltraCam": 28.00
|
||||
"Mantis i23": 45.00
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to verify what is about to be committed.
|
||||
# Called by "git commit" with no arguments. The hook should
|
||||
# exit with non-zero status after issuing an appropriate message if
|
||||
# it wants to stop the commit.
|
||||
#
|
||||
# To enable this hook, rename this file to "pre-commit".
|
||||
|
||||
exec 1>&2
|
||||
|
||||
echo "RUNNING PRE-COMMIT"
|
||||
|
||||
# Get list of files about to be committed
|
||||
if git diff --cached --name-only --diff-filter=ACM | grep 'ccd_defs.json'; then
|
||||
echo "We changed ccd_defs.json"
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
perl $GIT_ROOT/ccd_defs_check.pl
|
||||
fi
|
||||
|
||||
# non-zero exit fails the commit
|
||||
exit 0
|
Ładowanie…
Reference in New Issue