mattketmo/yamldiff

找出两个 YAML 文件之间的差异

v1.0.0 2014-09-14 10:28 UTC

This package is auto-updated.

Last update: 2024-09-05 20:34:38 UTC


README

Build status... Code quality... License MIT Packagist

找出 2 个 yaml 文件之间的差异。

安装

使用 Box Project 构建 PHAR 文件。

# Fetch the sources
git clone git://github.com/MattKetmo/yamldiff.git
cd yamldiff/

# Install dependencies (see https://getcomposer.org.cn/doc/00-intro.md#globally)
composer install

# Build the Phar (see http://box-project.org/)
box build

# Move it to your $PATH
mv yamldiff.phar /usr/local/bin/yamldiff

使用方法

yamldiff file1.yml file2.yml

这将显示在 file1.yml 中存在但在 file2.yml 中缺失的键(以 + 前缀),反之亦然(以 - 前缀)。

例如,当比较你的本地文件 parameters.ymlSymfony 项目中的版本化文件 parameters.yml.dist 时,这非常有用。

yamldiff app/config/parameters.yml.dist app/config/parameters.yml

许可证

YamlDiff 在 MIT 许可证下发布。有关详细信息,请参阅附带许可证文件