ScreamingDev / phpsemver

Check if your changes are a major change, minor change or just a patch.
MIT License
27 stars 0 forks source link

Command: "test" or "assert" to assert no major, minor, patch changes #26

Open ScreamingDev opened 8 years ago

ScreamingDev commented 8 years ago

A new command asserts that no major, minor or patch changed were made:

# assert that this is a major change (must contain at least on major change)
bin/phpsemver assert:major --strict 1.0.0 2.0.0

# assert that there is no major change (minor or lower allowed)
bin/phpsemver assert:minor 1.0.0 1.1.0

# assert that there is no minor change (minor or lower allowed)
bin/phpsemver assert:patch 1.0.0 1.0.1

Strict mode is disabled by default because this is a tool that might guess wrong. Enabling strict mode means that at least one major, minor, patch change must be found.