Files
nexus/wiki/concepts/Semantic-Versioning.md
2026-04-24 16:03:17 +08:00

38 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Semantic Versioning"
type: concept
tags:
- DevOps
- Version-Control
- Dependency-Management
last_updated: 2026-04-14
---
## Aliases
- SemVer
- Semantic Versioning
## Definition
语义化版本控制Semantic Versioning是一种版本号命名规范采用 `主版本号.次版本号.修订号`MAJOR.MINOR.PATCH格式。主版本号在不兼容的 API 变更时递增,次版本号在向后兼容的功能添加时递增,修订号在向后兼容的问题修复时递增。
## Versioning Levels
- **Major主版本**:破坏性变更,不兼容的 API 变更
- **Minor次版本**:新功能添加,向后兼容
- **Patch修订**Bug 修复,向后兼容
## Pre-release Labels
版本号后可附加预发布标签,如 `1.0.0-alpha``2.1.0-beta.3`
## In Renovate Bot Context
Renovate Bot 依据 SemVer 规则判断更新级别:
- **Patch 更新**`~1.0.0``1.0.x`
- **Minor 更新**`^1.0.0``1.x`
- **Major 更新**`*``1.0.0` 及以上
## Related Concepts
- [[Dependency-Management]] — 依赖管理
- [[Renovate-Bot]] — Renovate Bot 使用 SemVer 判断更新策略
## Related Sources
- [[ctp-topic-15-working-with-renovatebot]]