定制 schranz/mono 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

schranz/mono

最新稳定版本:2.2.1

Composer 安装命令:

composer require schranz/mono

包简介

A binary to run commands in a monorepo

README 文档

README

Managing a monorepository?

Mono helps you to initialize subtree split and run composer and other commands for all your package directories.

Installation

composer require schranz/mono --dev

Usage

Init Split Command

First create your mono repository and push it to Github.

Create your packages into different directories make sure for to create for all packages you want to split a composer.json with a name in it.

Then run:

vendor/bin/mono init-split

It will create the configuration for frankdejonge/use-subsplit-publish Github Action. Make sure to configure your PERSONAL_ACCESS_TOKEN as a secret in your Github repository. And configure the user in the newly created .github/workflows/publish-subsplits.yml file.

Run Command

To install the dependencies of all your mono repositories, just run:

vendor/bin/mono run composer install

To update them run:

vendor/bin/mono run composer update

To run a custom custom composer script use:

vendor/bin/mono run composer fix # runs in my case rector + php-cs-fixer

vendor/bin/mono run composer lint # runs in my case various linters (phpstan, php-cs, ...)

Mono is used and was build for managing schranz-search monorepository.

Upgrade dependency

If you have one dependency used in multiple packages and want to upgrade it in all packages you can use:

vendor/bin/mono upgrade-dependency phpstan/phpstan

Mono search for all packages which has then phpstan/phpstan in it and update it to the latest stable version.

Rename branch

If you want to rename a branch on all your packages in your mono repository you can use the following command:

PERSONAL_ACCESS_TOKEN=<token> vendor/bin/mono rename-branch 0.3 0.4

Mono search for all your packages and uses the Github API to rename a specific given branch to the new name.

You require at least a PERSONAL_ACCESS_TOKEN with contents:write or admins:write (default branch) scope.

Projects using mono

Let me know via an issue if you are using mono.

统计信息

  • 总下载量: 1.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-27