vers-cli

Crates.iovers-cli
lib.rsvers-cli
version0.1.0
sourcesrc
created_at2024-05-04 23:24:40.091204
updated_at2024-05-04 23:24:40.091204
descriptionSimple CLI tools for bumping and parsing version numbers
homepage
repositoryhttps://github.com/PanieriLorenzo/vers-cli
max_upload_size
id1229896
size85,282
(PanieriLorenzo)

documentation

README

Vers-CLI

Simple CLI tools for bumping and parsing version numbers

Crates.io Version docs.rs Crates.io License

Goals

  • Simple: no complicated configuration, just a few well-designed features
  • Composable: making full use of Unix pipes
  • Language-independent: use this in any project, no matter the language

Non-Goals

  • Release automation: this is language-dependent and there's a million tools out there (especially for JavaScript).
  • Conventional commits: parsing commits is messy and out of scope for this project, there are several good tools for this already.

Examples

vers-cli 0.1.0 | vers-cli bump patch
# -> 0.1.1

# understands "v" prefix
vers-cli v1.0.0 | vers-cli bump major | vers-cli bump patch
# -> v2.0.1

# understands (some) pre-releases
vers-cli v1.0.0-rc.1 | vers-cli release
# -> v1.0.0
vers-cli v1.0.0-rc.1 | vers-cli bump rc
# -> v1.0.0-rc.2

# invariant over metadata
vers-cli v1.0.0-rc.1+500 | vers-cli release
# -> v1.0.0+500

# can bump metadata
vers-cli v1.0.0+500 | vers-cli bump build
# -> v1.0.0+501

# linting
vers-cli 01.0.0 --lint
# -> error: leading zeros not allowed
# -> hint: use `1.0.0` instead
Commit count: 9

cargo fmt