All Projects → qzb → sh-semver

qzb / sh-semver

Licence: MIT License
Bash implementation of semantic versioning

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to sh-semver

ocaml-semver
Semantic version handling for OCaml
Stars: ✭ 16 (-42.86%)
Mutual labels:  semver
gradle-versioner
Gradle Version Plugin. Generates semantic versions with git meta data per branch.
Stars: ✭ 25 (-10.71%)
Mutual labels:  semver
koji
🦊 An interactive CLI for creating conventional commits.
Stars: ✭ 25 (-10.71%)
Mutual labels:  semver
ongeza
An automated way to follow the Semantic Versioning Specification
Stars: ✭ 36 (+28.57%)
Mutual labels:  semver
next-ver
Tells you the next semantic version for your local package
Stars: ✭ 27 (-3.57%)
Mutual labels:  semver
turbogit
Opinionated cli enforcing clean git workflow without comprising UX
Stars: ✭ 42 (+50%)
Mutual labels:  semver
semver-cli
semver-cli is a simple command line tool to compare and manipulate version strings.
Stars: ✭ 28 (+0%)
Mutual labels:  semver
cpp-semver
semver in c++
Stars: ✭ 25 (-10.71%)
Mutual labels:  semver
semver
Kotlin data class for Semantic Versioning 2.0.0 specification (SemVer)
Stars: ✭ 51 (+82.14%)
Mutual labels:  semver
bump
A generic version tracking and update tool
Stars: ✭ 33 (+17.86%)
Mutual labels:  semver
bin-version-cli
Get the version of a binary in semver format
Stars: ✭ 36 (+28.57%)
Mutual labels:  semver
cocogitto
The Conventional Commits toolbox
Stars: ✭ 242 (+764.29%)
Mutual labels:  semver
zerover
0️⃣ Minimalist versioning scheme for devs who can't be bothered.
Stars: ✭ 141 (+403.57%)
Mutual labels:  semver
gradle-semantic-build-versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 19 (-32.14%)
Mutual labels:  semver
breakcheck
Backwards compatibility linter for Go.
Stars: ✭ 66 (+135.71%)
Mutual labels:  semver
dont-crack
semantic-release plugin checking if the new semantic release is breaking dependent projects
Stars: ✭ 14 (-50%)
Mutual labels:  semver
semver-generator
Semantic version generator using git commit keywords and overrides
Stars: ✭ 26 (-7.14%)
Mutual labels:  semver
git-semver
a small cli tool to version your git repository with semantic versioning
Stars: ✭ 19 (-32.14%)
Mutual labels:  semver
terraform-module-versions
CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform
Stars: ✭ 143 (+410.71%)
Mutual labels:  semver
verl
SemVer 2.0 parsing, matching, and comparisons for Erlang
Stars: ✭ 28 (+0%)
Mutual labels:  semver

sh-semver

NPM Version Build

The semantic versioner for Bourne Shell.

CLI

semver.sh [-r <rule>] [<version>... ]

Given a rule and one or many versions, it will return all of the provided versions that satisfy the rule, in sorted order, one per line.

If versions are omitted from the command line, it will read them from STDIN.

If the rule is omitted from the command line, it will simply sort all the provided versions.

Ranges

Every version range contains one or more sets of comparators. To satisfy version range version must satisfies all comparators from at least one set. Sets are separated with two vertical bars ||. Rules in each set are separated with whitespaces. Empty set are treated as wildcard comparator *.

Basic comparators

There are five basic comparators:

  • Equal to =A.B.C (= operator is optional, it may be provided but usually it isn't).
  • Less than <A.B.C
  • Greater than >A.B.C
  • Less than or equal to <=A.B.C
  • Greater than or equal to >=A.B.C

Advanced comparators

Wildcards * *.* *.*.*

Wildcard comparators can be satisfied by any version, even prerelease one.

Instead of * character can be used x or X.

Wildcard ranges A.*.* A.B.*

Wildcard ranges can be satisfied when only part of version is matching. In contrast to wildcards, wildcard ranges cannot be satisfied by prerelease versions.

  • A.*.* is satisfied when majors are the same,
  • A.B.* is satisfied when majors and minors are the same.

The special character (*, x or X) is optional.

Examples
  • 1.2 := >=1.2.0 <1.3.0
  • 5.*.* := >=5.0.0 <6.0.0
Caret ranges ^A.B.C

Matches to compatible versions.

Examples
  • ^1.2.3 := >=1.2.3 <2.0.0
  • ^0.1.2 := >=0.1.2 <0.2.0
  • ^0.0.1 := >=0.0.1 <0.0.2
Tilde ranges ~A.B.C ~A.B ~A

If patch version is specified tilde ranges matches to all greater or equal versions with the same minor version. Otherwise is equivalent of A.B.* when minor version is specified or A.*.* when not.

Hyphen ranges A.B.C - X.Y.Z

Hyphen range A.B.C - X.Y.Z equivalent of >=A.B.C <=X.Y.Z.

Prerelease versions

Prerelease versions can satisfy comparators set only when have the same minor major and patch numbers as at least one of comparators.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].