mirror of
https://github.com/cisagov/log4j-affected-db.git
synced 2024-11-22 16:40:48 +00:00
Add flag to install pre-commit hooks now.
This commit is contained in:
parent
ae21af1084
commit
c5e7edf46b
1 changed files with 6 additions and 2 deletions
|
@ -37,6 +37,10 @@ PARAMS=""
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
while (( "$#" )); do
|
while (( "$#" )); do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
-i|--install-hooks)
|
||||||
|
INSTALL_HOOKS=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-f|--force)
|
-f|--force)
|
||||||
FORCE=1
|
FORCE=1
|
||||||
shift
|
shift
|
||||||
|
@ -148,8 +152,8 @@ for req_file in "requirements-dev.txt" "requirements-test.txt" "requirements.txt
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install git pre-commit hooks
|
# Install git pre-commit hooks now or later.
|
||||||
pre-commit install
|
pre-commit install ${INSTALL_HOOKS:+"--install-hooks"}
|
||||||
|
|
||||||
# Setup git remotes from lineage configuration
|
# Setup git remotes from lineage configuration
|
||||||
# This could fail if the remotes are already setup, but that is ok.
|
# This could fail if the remotes are already setup, but that is ok.
|
||||||
|
|
Loading…
Reference in a new issue