File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,14 +72,13 @@ MIGRATION_HEAD_BRANCH="${MIGRATION_HEAD_BRANCH:-main}"
7272echo " Basing migration branch on: ${MIGRATION_HEAD_BRANCH} "
7373
7474# 1. Clone the source repository
75- if [ ! -d " $SOURCE_DIR " ]; then
76- echo " Cloning source repo: $SOURCE_REPO_URL into $SOURCE_DIR "
77- git clone " $SOURCE_REPO_URL " " $SOURCE_DIR "
78- fi
79-
8075if [ " $SKIP_SOURCE_UPDATE " == " true" ]; then
8176 echo " Skipping source update"
8277else
78+ rm -rf " ${SOURCE_DIR} "
79+ echo " Cloning source repo: $SOURCE_REPO_URL into $SOURCE_DIR "
80+ git clone " $SOURCE_REPO_URL " " $SOURCE_DIR "
81+
8382 pushd " $SOURCE_DIR "
8483 git fetch origin
8584 git checkout -f " main"
8988 # 1.1 Modify history of the split repo to move files to the destination target directory
9089 echo " Moving files to destination path: ${SOURCE_REPO_NAME} "
9190 git filter-repo \
92- --to-subdirectory-filter " ${SOURCE_REPO_NAME} " --force
91+ --to-subdirectory-filter " ${SOURCE_REPO_NAME} " --force
9392 popd
9493fi
9594
You can’t perform that action at this time.
0 commit comments