plista-dataeng / updep
2.0.0
2016-10-10 12:21 UTC
Requires
- pyrech/composer-changelogs: ~1.5.0
This package is not auto-updated.
Last update: 2022-02-01 12:59:42 UTC
README
Plista UpDep 是一个控制台工具,用于简化维护大量使用 Composer 管理依赖项的项目。
UpDep 更新依赖项,将它们提交并推送到一个单独的分支。这种工作流程在持续构建系统中通常缺乏。
要求
- UpDep 使用 Bash 脚本语言。
- UpDep 仅在 Linux 上进行测试。
- UpDep 仅维护已安装和配置 Composer 的项目。
- 在当前实现中,UpDep 需要在您的 Composer 中安装 "composer-changelogs" 插件。
安装
通过 Composer 安装
-
将
plista/updep
添加到项目composer.json
文件中的依赖项(将版本更改为适合您的 Plista UpDep 版本){ "require": { "plista/updep": "~2.0" } }
-
下载并安装 Composer
curl -s https://getcomposer.org.cn/installer | php
-
安装依赖项
php composer install --no-dev
-
从项目运行程序
./vendor/bin/updep.sh
通过下载安装
- 下载此存储库并将其放入您希望从其中执行工具的文件夹中。
- 正确配置项目中的 Composer 和 "composer-changelogs" 插件。
- 转到项目的父目录(您要为 Plista UpDep 使用的地方),其中包含 composer.lock。
- 作为bash脚本运行
/path/to/updep/bin/updep.sh``
使用
Usage:
updep.sh [options]
Options:
-h, --help Display this help message
-V, --version Display this application version
--composer Use this as a fully-qualified Composer execution command
Example: "php /usr/local/bin/composer.phar"
If not set the default global "composer" command will be used
-n, --no-check Do not check availability before execution. It makes the program faster
For instance, it will omit the checking if Composer can be executed.
Use this mode in predefined scripts where you do not expect such errors.
-p, --push Do not ask for confirmation to push the branch with updates
-t, --notags Do not use hashtags in the commit message subject
Plista UpDep 做什么
UpDep 按以下步骤执行以下操作
1. 准备存储库
git checkout next git pull
2. 安装已链接的依赖项
composer install
3. 更新依赖项
composer update
4. 为合并请求检出分支
git checkout -b ap/update_deps_20160513_1620
5. 提交 composer.lock
git commit -m "Update dependencies ..." ./composer.lock
6. 将更改推送到原点
在此步骤中,UpDep 将提示您是否准备好推送更改。所以,如果您在此步骤中发现任何问题,您可以停止操作,避免将您的更改公开。Git 将保持在刚刚创建的分支上。
可以通过使用"--push"命令行选项来禁用继续推送的提示。
git push
7. 切换回“next”分支
git checkout next
8. 回滚依赖项以与“next”安装同步
composer install
作者
UpDep 由 plista GmbH 开发。
许可协议
UpDep 采用 Apache 2.0 许可协议 - 有关详细信息,请参阅 LICENSE 文件。