Skip to content

Commit a55a5ec

Browse files
committed
chore: exclude common files from source root in migration script
1 parent 2bd0821 commit a55a5ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

monorepo-migration/migrate.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ git merge --allow-unrelated-histories --no-ff "$SOURCE_REPO_NAME/main" -s ours -
114114
echo "Reading tree into prefix $SOURCE_REPO_NAME/..."
115115
git read-tree --prefix="$SOURCE_REPO_NAME/" -u "$SOURCE_REPO_NAME/main"
116116

117+
# 6.5 Remove common files from the root of the migrated library
118+
echo "Removing common files from the root of $SOURCE_REPO_NAME/..."
119+
rm -f "$SOURCE_REPO_NAME/.gitignore"
120+
rm -f "$SOURCE_REPO_NAME/renovate.json"
121+
rm -f "$SOURCE_REPO_NAME/LICENSE"
122+
find "$SOURCE_REPO_NAME" -maxdepth 1 -name "*.md" ! -name "CHANGELOG.md" ! -name "README.md" -delete
123+
117124
# 7. Commit the migration
118125
echo "Committing migration..."
119126
git commit -n --no-gpg-sign -m "chore($SOURCE_REPO_NAME): migrate $SOURCE_REPO_NAME into monorepo"

0 commit comments

Comments
 (0)