Auto-sync: 2026-04-24 16:03
This commit is contained in:
37
wiki/concepts/Semantic-Versioning.md
Normal file
37
wiki/concepts/Semantic-Versioning.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
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]]
|
||||
Reference in New Issue
Block a user