Browse Source

[FIX] Problem with pre-commit hook that does not exist on 2.0 branchs.

master
Olivier DOSSMANN 5 years ago
parent
commit
b8f68384a6
  1. 8
      launch.sh

8
launch.sh

@ -231,10 +231,12 @@ init() {
GIT_WORK_TREE="${GISSMO_DIR}/" GIT_DIR="${GISSMO_DIR}/.git/" git pull -q origin ${GIT_BRANCH} || error_and_quit "Pull command on Git repository failed."
fi
info "Git repository state checked."
# install pre-commit hook that check code validity and more
# install pre-commit hook that check code validity and more (only for 1.9 branchs)
if ! test -f "${GISSMO_DIR}/.git/hooks/pre-commit"; then
cp "${GISSMO_DIR}/scripts/git_hooks/pre-commit" "${GISSMO_DIR}/.git/hooks/pre-commit" || error_and_quit "Failed to install pre-commit hook."
info "Git repository pre-commit hook installed."
if test -f "${GISSMO_DIR}/scripts/git_hooks/pre-commit"; then
cp "${GISSMO_DIR}/scripts/git_hooks/pre-commit" "${GISSMO_DIR}/.git/hooks/pre-commit" || error_and_quit "Failed to install pre-commit hook."
info "Git repository pre-commit hook installed."
fi
fi
source bin/activate || error_and_quit "Failed entering python virtual environment"
cd "$GISSMO_DIR"

Loading…
Cancel
Save