Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Commit

Permalink
fix git issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ahelal committed Mar 24, 2017
1 parent f7517f2 commit 4ad6a12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,19 @@ manage_git(){
print_verbose "Cloning '${git_repo}' to ${app_git_dir}"
RUN_COMMAND_AS "git clone ${git_repo} --recursive"
else
cd "${app_git_dir}" || msg_exit "Failed to cd into '${app_git_dir}'"
RUN_COMMAND_AS "git fetch origin --tags"
fi

# will also run this first run :(
print_verbose "checking out '${branch}' from '${git_repo}'"
print_verbose "checking out '${branch}' from '${app_git_dir}'"
cd "${app_git_dir}"
RUN_COMMAND_AS "git checkout ${branch}"
RUN_COMMAND_AS "git pull -q --rebase"

if git show-ref --verify "refs/heads/${branch}"; then
print_verbose "git pulling from '${app_git_dir}'"
RUN_COMMAND_AS "git pull -q --rebase"
fi

if [ -z "${submodule}" ]; then
print_verbose "git updating submodule for '${git_repo}'"
Expand Down

0 comments on commit 4ad6a12

Please sign in to comment.