From 237a2553ac61971e4743d78dc5ee5dda2ff18ba7 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Tue, 22 Dec 2015 12:17:24 +0530 Subject: [PATCH] script variables for clone urls --- assets/build/install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/assets/build/install.sh b/assets/build/install.sh index a4a39fda..be6e9077 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -1,6 +1,10 @@ #!/bin/bash set -e +GITLAB_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-ce.git +GITLAB_SHELL_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-shell.git +GITLAB_WORKHORSE_CLONE_URL=https://gitlab.com/gitlab-org/gitlab-workhorse.git + GEM_CACHE_DIR="${GITLAB_BUILD_DIR}/cache" BUILD_DEPENDENCIES="gcc g++ make patch pkg-config cmake paxctl \ @@ -42,24 +46,21 @@ exec_as_git git config --global core.autocrlf input # install gitlab-shell echo "Cloning gitlab-shell v.${GITLAB_SHELL_VERSION}..." -exec_as_git git clone -q -b v${GITLAB_SHELL_VERSION} --depth 1 \ - https://gitlab.com/gitlab-org/gitlab-shell.git ${GITLAB_SHELL_INSTALL_DIR} +exec_as_git git clone -q -b v${GITLAB_SHELL_VERSION} --depth 1 ${GITLAB_SHELL_CLONE_URL} ${GITLAB_SHELL_INSTALL_DIR} cd ${GITLAB_SHELL_INSTALL_DIR} exec_as_git cp -a ${GITLAB_SHELL_INSTALL_DIR}/config.yml.example ${GITLAB_SHELL_INSTALL_DIR}/config.yml exec_as_git ./bin/install echo "Cloning gitlab-workhorse v.${GITLAB_WORKHORSE_VERSION}..." -exec_as_git git clone -q -b ${GITLAB_WORKHORSE_VERSION} --depth 1 \ - https://gitlab.com/gitlab-org/gitlab-workhorse.git ${GITLAB_WORKHORSE_INSTALL_DIR} +exec_as_git git clone -q -b ${GITLAB_WORKHORSE_VERSION} --depth 1 ${GITLAB_WORKHORSE_CLONE_URL} ${GITLAB_WORKHORSE_INSTALL_DIR} cd ${GITLAB_WORKHORSE_INSTALL_DIR} exec_as_git make # shallow clone gitlab-ce echo "Cloning gitlab-ce v.${GITLAB_VERSION}..." -exec_as_git git clone -q -b v${GITLAB_VERSION} --depth 1 \ - https://github.com/gitlabhq/gitlabhq.git ${GITLAB_INSTALL_DIR} +exec_as_git git clone -q -b v${GITLAB_VERSION} --depth 1 ${GITLAB_CLONE_URL} ${GITLAB_INSTALL_DIR} # remove HSTS config from the default headers, we configure it in nginx exec_as_git sed -i "/headers\['Strict-Transport-Security'\]/d" ${GITLAB_INSTALL_DIR}/app/controllers/application_controller.rb