bump
Compute the new versions from the commits and write them to the package.json files, without changelog, commit, tag nor publication.
Usage
bash
relizy bump [options]bump is the first step of release. It:
- checks the working directory is clean (unless
--no-clean); - computes the version of each package from its commits (see SemVer Convention), and its dependents (see Dependency Management);
- asks to confirm the new versions, unless
--yes; - writes them to the
package.jsonfiles.
It exits with code 0 when no commit triggers a bump. The global options apply too (--dry-run, --group...).
Options
| Flag | Description | Config |
|---|---|---|
--major, --minor, --patch | Force the bump type, instead of the one computed from the commits | bump.type |
--prerelease, --premajor, --preminor, --prepatch | Bump to a prerelease version, see Prerelease Versions | bump.type |
--preid <id> | Prerelease identifier: alpha, beta, rc... | bump.preid |
--suffix <suffix> | With a prerelease type, replace the last number: 1.0.0-beta.0 becomes 1.0.0-beta.<suffix> | bump.suffix |
--canary | Write a canary version, {nextVersion}-0.canary-{sha} (bump.preid or --preid replaces canary), from the commits: the type flags, --force and --suffix are ignored, and the version stays in the package.json files. See Canary Releases | release.canary |
--force | Bump the packages even without a commit triggering a bump | - |
--no-clean | Bump with uncommitted changes. In a terminal, asks to confirm when they touch a file the release commits | bump.clean |
--yes | Confirm the new versions without asking. Required without an interactive terminal (CI) | bump.yes |
--private-packages <mode> | release: bump the private packages too, ignore: leave them out | monorepo.privatePackages |
Examples
bash
# Preview the new versions
relizy bump --dry-run
# Computed from the commits, without confirmation
relizy bump --yes
# Force a minor
relizy bump --minor
# 1.2.0 -> 1.3.0-beta.0, then 1.3.0-beta.1
relizy bump --preminor --preid beta
relizy bump --prerelease --preid beta
# 1.3.0-beta.0 -> 1.3.0-beta.<short sha>
relizy bump --prerelease --preid beta --suffix "$(git rev-parse --short HEAD)"
# 1.2.3 -> 1.3.0-0.canary-a3f4b2c
relizy bump --canary