Linux command
standard-version 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Release new version
standard-version
First release
standard-version --first-release
Pre-release version
standard-version --prerelease alpha
Dry run
standard-version --dry-run
Specific version bump
standard-version --release-as [major|minor|patch]
Skip changelog
standard-version --skip.changelog
说明
standard-version automates semantic versioning and changelog generation for Node.js projects based on the Conventional Commits specification. It analyzes commit messages (feat, fix, BREAKING CHANGE) to determine whether to bump the major, minor, or patch version. The tool updates the version in package.json, generates or updates a CHANGELOG.md from commit messages, creates a git commit with the version bump, and tags it with the new version number. A dry run mode previews changes without modifying files. Pre-release tags (alpha, beta, rc) are supported for staged releases.
参数
- --first-release
- First version.
- --release-as _TYPE_
- Version bump type.
- --prerelease _TAG_
- Pre-release tag.
- --dry-run
- Preview only.
- --skip.changelog
- Skip changelog.
- -s, --sign
- Sign commits and tags with GPG.
- -a, --commit-all
- Commit all staged files, not just package/changelog.
- -t, --tag-prefix _prefix_
- Customize tag prefix (default: v).
- --no-verify
- Bypass pre-commit/commit-msg git hooks.
FAQ
What is the standard-version command used for?
standard-version automates semantic versioning and changelog generation for Node.js projects based on the Conventional Commits specification. It analyzes commit messages (feat, fix, BREAKING CHANGE) to determine whether to bump the major, minor, or patch version. The tool updates the version in package.json, generates or updates a CHANGELOG.md from commit messages, creates a git commit with the version bump, and tags it with the new version number. A dry run mode previews changes without modifying files. Pre-release tags (alpha, beta, rc) are supported for staged releases.
How do I run a basic standard-version example?
Run `standard-version` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --first-release do in standard-version?
First version.