jonpugh/composer-git-build

本包的最新版本(dev-master)没有提供许可证信息。

将供应商和其他忽略的文件添加到git中的命令,

安装: 279

依赖项: 0

建议者: 0

安全性: 0

星标: 1

关注者: 1

分支: 3

开放问题: 0

类型:composer-plugin

dev-master 2018-03-08 21:37 UTC

This package is auto-updated.

Last update: 2024-09-14 05:52:02 UTC


README

该工具的目标是尽可能简化将忽略的目录提交到git的过程。

也被称为“工件构建”,此命令将

  1. 如果指定了--build-dir,则创建一个新的仓库并添加您的git远程仓库。
  2. 从当前分支拉取最新更改。
  3. 自动修改您的.gitignore文件,允许添加供应商和其他代码。
  4. 提交所有不再被忽略的新代码。
  5. 创建一个新的分支或标签。
  6. 将分支或标签推送到远程仓库。

此插件代码大量借鉴自Acquia的BLT命令deploy命令

用法

  1. 添加到您的composer项目或全局

    composer require jonpugh/composer-git-build

    -or-

    composer global require jonpugh/composer-git-build

  2. 添加到您的.gitignore文件

    ## IGNORED IN GIT BUILD: ##
    # Items below this line will retained in artifacts built with the `composer git-build` command.
    
  3. 添加到您的composer.json文件

    {
        "config": {
            "git.remotes": [
                "git@github.com:organization/build-repo.git",
                 "svn@acquia.com"
            ]
        }
    }

    新构建的仓库将自动添加这些远程仓库,并将标签或分支推送到它们。

  4. 运行composer git-build

    Usage:
       git-build [options]
     
     Options:
       -b, --build-dir[=BUILD-DIR]    Directory to create the git artifact. Defaults to the composer working-dir option.
           --branch=BRANCH            Branch to create.
           --tag=TAG                  Tag to create.
       -m, --commit-msg=COMMIT-MSG    Commit message to use.
           --ignore-dirty             Allow committing even if git working copy is dirty (has modified files).
           --dry-run                  Build and commit to the repository but do not push.
    
    

感谢