Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit b426678

Browse files
author
Alex Paliarush
committed
Option to specify default branches for repositories in config.yaml #83
1 parent 5278fc7 commit b426678

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

init_project.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,22 @@ function checkoutSourceCodeFromGit()
5858
function initMagentoCeGit()
5959
{
6060
initGitRepository ${repository_url_ce} "CE" "${magento_ce_dir}"
61-
cd ${vagrant_dir}
6261
}
6362

6463
function initMagentoEeGit()
6564
{
6665
initGitRepository ${repository_url_ee} "EE" "${magento_ee_dir}"
67-
cd ${vagrant_dir}
6866
}
6967

7068
function initMagentoCeSampleGit()
7169
{
7270
repository_url_ce_sample_data="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "repository_url_ce_sample_data")"
7371
initGitRepository ${repository_url_ce_sample_data} "CE sample data" "${magento_ce_sample_data_dir}"
74-
cd ${vagrant_dir}
7572
}
7673

7774
function initMagentoEeSampleGit()
7875
{
7976
initGitRepository ${repository_url_ee_sample_data} "EE sample data" "${magento_ee_sample_data_dir}"
80-
cd ${vagrant_dir}
8177
}
8278

8379
# Initialize the cloning and checkout of a git repository
@@ -104,9 +100,10 @@ function initGitRepository()
104100
if [[ -n ${branch} ]]; then
105101
status "Checking out branch ${branch} of ${repository_name} repository"
106102
cd "${directory}"
107-
git fetch
108-
git checkout ${branch}
103+
git fetch 2> >(logError) > >(log)
104+
git checkout ${branch} 2> >(log) > >(log)
109105
fi
106+
cd "${vagrant_dir}"
110107
}
111108

112109
# Get the git repository from a repository_url setting in config.yaml

0 commit comments

Comments
 (0)