From 575b214c8ed16e3cf0a87fcd6fc50b0883ad727b Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 5 Apr 2021 13:32:13 -0400 Subject: [PATCH] build: setup pre-commit in deploy_linux.sh --- deployment_scripts/deploy_linux.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh index 408aa3148..940b763d5 100755 --- a/deployment_scripts/deploy_linux.sh +++ b/deployment_scripts/deploy_linux.sh @@ -23,6 +23,13 @@ log_message() { echo -e "DEPLOYMENT SCRIPT: $1" } +configure_precommit() { + $1 -m pip install --user pre-commit + pushd "$2" + $HOME/.local/bin/pre-commit install + popd +} + if is_root; then log_message "Please don't run this script as root" exit 1 @@ -225,5 +232,7 @@ fi sudo chmod +x "${INFECTION_MONKEY_DIR}/build_linux.sh" +configure_precommit ${python_cmd} ${monkey_home} + log_message "Deployment script finished." exit 0