netpromotion / deployer
从仓库中取数据并将非忽略的文件上传到远程服务器
v1.0.6
2018-01-09 21:55 UTC
Requires
- php: >=5.4
- dg/ftp-deployment: ^2.7
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-09-26 06:44:47 UTC
README
它从仓库中获取数据并将非忽略的文件上传到远程服务器
如何使用它
- 转到您的项目目录
- 运行
composer require --dev netpromotion/deployer
- 创建
deploy.json
文件 - 配置方式类似于
dg/ftp-deployment
,差异log
是一个对象,包含两个可选键:config
是最终配置的备份路径,output
是输出日志的路径ignore
是一个数组,包含额外的忽略文件(覆盖.gitignore
)
- 私有属性(例如
remote
)提取到deploy.local.json
文件 - 运行
./vendor/bin/deploy
示例
deploy.json
{ "test": true, "log": { "config": "/deploy.config.log" }, "ignore": [ "/tests/", "!/vendor/" ], "before": [ "local: git tag -f deployed", "local: git push -f origin deployed", "local: composer install" ], "after": [ "http://server.tld/deployed.php" ] }
deploy.local.json
{ "test": false, "remote": "ftp://user:password@server.tld/directory" }