Skip to content

Commit 7dc3180

Browse files
author
Jon Lockwood
committed
Merge pull request 'fix: sub-docs merge branch logic' (#12) from development into master
Reviewed-on: https://nofusscomputing.com/git/docker/mkdocs-ci/pulls/12
2 parents 0b7ffd9 + ab951e5 commit 7dc3180

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

includes/entrypoint.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ build_child() {
5959
echo "data: child_repo_host=${child_repo_host}";
6060
echo "data: child_repo_user=${child_repo_user}";
6161
echo "data: child_repo_name=${child_repo_name}";
62+
echo "data: child_repo_name=[${child_repo_branch}]";
6263

63-
if [[ ${child_repo_branch+x} && -n $child_repo_branch ]]; then
64+
65+
if [ -n "${child_repo_branch}" ]; then
6466

6567
CLONE_REF=${child_repo_branch}
6668

@@ -74,10 +76,12 @@ build_child() {
7476

7577
fi
7678

77-
git clone --branch "${CLONE_REF}" --depth=1 ${child_repo_host}/${child_repo_user}/${child_repo_name} ${HOME_DIR}/artifacts/${child_repo_user}/${child_repo_name};
79+
git clone --branch "${CLONE_REF}" --depth=1 ${child_repo_host}/${child_repo_user}/${child_repo_name} ${HOME_DIR}/artifacts/$(printf '%s' "${child_repo_user}" | tr '/' '_')/${child_repo_name};
7880

7981
echo "Finished cloning: ${CLONE_REF}";
8082

83+
child_repo_user=$(printf '%s' "${child_repo_user}" | tr '/' '_')
84+
8185
cd ${HOME_DIR}/artifacts/${child_repo_user}/${child_repo_name};
8286

8387
if [ -n "${template_repo}" ]; then

0 commit comments

Comments
 (0)