nerijusza/yamldiff

找出两个 YAML 文件之间的差异。从 'mattketmo/yamldiff' 分支而来

v1.0.2 2018-06-13 18:49 UTC

This package is not auto-updated.

Last update: 2024-09-21 01:49:56 UTC


README

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

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

安装

使用 Box Project 构建 PHAR 文件。

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

# Install dependencies (see https://getcomposer.org/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 上的键(前缀为 +),反之亦然(前缀为 -)。

例如,当比较一个 Symfony 项目中本地的 parameters.yml 文件和版本化的 parameters.yml.dist 文件时,这非常有用

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

许可

YamlDiff 采用 MIT 许可证发布。有关详细信息,请参阅捆绑的 LICENSE 文件