Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 2.14 KB

File metadata and controls

61 lines (46 loc) · 2.14 KB

Monorepo migration

This document explains the procedure to migrate independent packages to this monolithic repository.

References:

Align dependencies with Monorepo Builder

  1. Install the tool, if it isn't already present:
composer require symplify/monorepo-builder --dev

vendor/bin/monorepo-builder init
  1. Run the following command, until all dependencies aren't aligned:

vendor/bin/monorepo-builder merge

Remove submodule if present

If the package to be merged has been added through a submodule, you will need to remove the submodule configuration effectively.

  1. Delete the relevant section from the .gitmodules file.
  2. Stage the .gitmodules changes with git add .gitmodules
  3. Delete the relevant section from .git/config.
  4. Run git rm --cached <path_to_submodule> (no trailing slash).
  5. Run rm -rf .git/modules/<path_to_submodule> (no trailing slash).
  6. Commit git add <path_to_submodule>
  7. Commit git commit -m "Migrated <package> from submodule to the monorepo"

Add the package to automatic package split

In the file .github/workflows/package-split.yaml there is a declared matrix at path jobs.packages_split.strategy.matrix that looks like:

      matrix:
        # define package to repository map
        package:
          -
            local_path: 'action-contracts'
            split_repository: 'action-contracts'

Add your package to the list. local_path represents the package's directory inside the packages directory. split_repository represents the git repository name inside the github.com/php-etl organization.