承接 andkirby/multi-repo-composer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

andkirby/multi-repo-composer

最新稳定版本:v0.9.3

Composer 安装命令:

composer require andkirby/multi-repo-composer

包简介

Plugin for loading multi-repository packages (several packages in the only repository).

README 文档

README

Gitter This repository contains multi-package composer repository and GitLab repository for composer.

Released v0.9.x. It supports generating "dist" config for packages. Satis may provide links to archives.

Requirements

Package Name

You have to name your packages by name format: vendor/my_repo-package_name Where package_name - your namespace in GIT.

Naming

Please be aware "-" is namespace separator in first case. A package with name me/foo-cool_package-second_edition will produce a multi-repo directory:

me/foo-multi-repo

foo - is a base repository name in this example.

That's why you SHOULD NOT use "-" in the name spaces.

Branch Name and Tag Name

Branch and tag should have a namespace like PackageName/branch. Examples:

PackageName/master
PackageName/develop
PackageName/some-another-branch
PackageName/v1.0.0
PackageName/1.0.0-beta

Single GIT repository in vendor

If you require several packages from your multi-repository it will create the one with GIT (if you use vcs). The name by example is vendor/myrepo-multi-repo. Ie your general repository name + -multi-repo. It's just to avoid clone a repository several times.

Satis

andkirby/satis is modified version of composer/satis with supporting multi-repositories.

GIT Flow

You may follow GIT Flow.

Configuring

Default multi repositories path

Actually multi-repositories will be placed in the repositories cache directory:

~/.composer/cache/repo/your-vendor/your_project-multi-repo

Custom multi-repositories directory

But you may customize it via root configuration below:

{
  "extra":
    "multi-repo-parent-dir": "/path/to/multi-repo/dirs/"
}

Current vendor multi-repositories directory

Also you may use saving in the current vendor directory.

{
  "extra":
    "multi-repo-dir-in-cache": false
}

It will have following structure:

./
  composer.json
  vendor/
    your-vendor/
      your_project-cool_package/
      your_project-multi-repo/

GitFlow

Probably it would be useful to switch a namespace in GitFlow quickly. Try to use composer package rikby/gitext

Manual way

Create a file .git-flow-namespace-set.sh

vim ~/.git-flow-namespace-set.sh
#!/bin/sh
git config gitflow.branch.master "$1"/master
git config gitflow.branch.develop "$1"/develop
git config gitflow.prefix.feature "$1"/feature/
git config gitflow.prefix.bugfix "$1"/bugfix/
git config gitflow.prefix.release "$1"/release/
git config gitflow.prefix.hotfix "$1"/hotfix/
git config gitflow.prefix.support "$1"/support/
git config gitflow.prefix.versiontag "$1"/v

And then add an alias

git config --global alias.flow-namespace-set '!bash ~/.git-flow-namespace-set.sh'

Now you may use it:

git flow-namespace-set ModuleName

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-12