From c9a040e2fb16096bcd3b488f7859b444658b7f47 Mon Sep 17 00:00:00 2001 From: hannesdelbeke Date: Mon, 19 Dec 2022 11:20:06 +0000 Subject: [PATCH] add submodule support --- entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9110ad2..36d882c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -83,7 +83,8 @@ else echo "Copying files matching \"${FILE_FILTER}\" from \"${SRC_REPO_NAME}/${SRC_PATH}\" and pushing it to ${DST_OWNER}/${DST_REPO_NAME}" fi -git clone --branch ${SRC_BRANCH} --single-branch --depth 1 https://${PERSONAL_TOKEN}@github.com/${SRC_REPO}.git +git clone --recurse-submodules --branch ${SRC_BRANCH} --single-branch --depth 1 https://${PERSONAL_TOKEN}@github.com/${SRC_REPO}.git +git submodule update --remote if [ "$?" -ne 0 ]; then echo >&2 "Cloning '$SRC_REPO' failed" exit 1 @@ -115,7 +116,8 @@ if [[ -n "$FILTER" ]]; then fi -git clone --branch ${DST_BRANCH} --single-branch --depth 1 https://${PERSONAL_TOKEN}@github.com/${DST_REPO}.git ${DST_REPO_DIR} +git clone --recurse-submodules --branch ${DST_BRANCH} --single-branch --depth 1 https://${PERSONAL_TOKEN}@github.com/${DST_REPO}.git ${DST_REPO_DIR} +git submodule update --remote if [ "$?" -ne 0 ]; then echo >&2 "Cloning branch '$DST_BRANCH' in '$DST_REPO' failed" echo >&2 "Falling back to default branch"