Skip to content

Usage

CLI Usage

Synopsis

torikae [old_version] [new_version] [flags]

Arguments

  1. old_version: The current version string to be replaced (e.g., 1.0.0).
  2. new_version: The new version string to apply (e.g., 1.0.1).

Flags

  • -c, --config <file>: Path to the configuration file (default: .torikae.toml).
  • -n, --dry-run: Perform a trial run without writing changes to files. Logs what would happen.
  • -l, --log-level <level>: Set logging verbosity (debug, info, warn, error). Default: info.

Example

torikae 1.0.0 1.0.1 --dry-run

Configuration

Torikae uses a TOML configuration file (default: .torikae.toml) to define which files to process and how to replace version strings. Use the --config flag to specify a custom config, for example to generate it using Nix.

[file."path/to/file"]
formats = ["pattern1 {version}", "patt{version}ern2"]
  • formats: Array of strings defining the replacement patterns.
  • The string {version} is a placeholder for the version number.
  • Torikae will search for the pattern with the old_version substituted and replace it with the pattern with the new_version substituted.

Example Configuration

[file."Cargo.toml"]
formats = ['version = "{version}"']

[file."package.json"]
formats = ['"version": "{version}"']