[FIX] Retry choosen branch from repository

This commit is contained in:
Olivier DOSSMANN 2016-02-15 10:51:57 +01:00
parent 1cc80c028a
commit 42aeb4972b

View File

@ -222,12 +222,13 @@ init() {
info "Python virtual environment initialized."
fi
cd $PROJECT_DIR
# On Fedora 23: postgresql-libs python3-devel python-virtualenv git-core python3-pip
sudo apt-get install -qq libpq-dev python3-dev python-virtualenv git-core python3-pip || error_and_quit "Dependancies installation failed."
info "Dependancies via apt-get checked/installed."
if ! test -d "$GISSMO_DIR/.git/"; then
git clone -q -b "$GIT_BRANCH" "$GIT_URL" "$GISSMO_DIR" || error_and_quit "Fetch Git repository failed."
else
GIT_WORK_TREE="${GISSMO_DIR}/" GIT_DIR="${GISSMO_DIR}/.git/" git pull -q origin master || error_and_quit "Pull command on Git repository failed."
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