Skip to Content
持續交付|使用Java
book

持續交付|使用Java

by Daniel Bryant, Abraham Marín-Pérez
July 2019
Intermediate to advanced
480 pages
9h 35m
Chinese
GoTop Information, Inc.
Content preview from 持續交付|使用Java
274
| 第十章
語義化版本控制(semver
在現今的微服務領域中,讓基礎程式共用某項功能最常見的做法就是為該功能建立新
服務。但有時建立共用功能的程式庫也很有幫助,尤其是在處理語法糖構造(syntactic
sugar constructs)時,你也必須謹慎地處理這些程式庫演變的方式。
5 章介紹過,Semantic Versioning(語義化版本系統)或 semver 是一組規則,可讓你
從程式庫的版本號碼知道內部的更改程度。就最簡單的形式而言,semver 的版本號碼有
三個以句點分隔的數字:MAJOR.MINOR.PATCH。當程式庫、框架或工具的新版本釋
出時,這三個數字只有一個會增加,通常是遞增一個單位。你可以從增加的數字知道變
動的程度:
MAJOR
新版本引入不回溯相容的變動,使用新版本可能會在編譯期與 / 或執行期破壞用戶
端程式碼。出現 MAJOR 更新時,MINOR PATCH 通常會被設為零。
MINOR
新版本引入一些新的、回溯相容的功能,既有的用戶端在使用新版本時應該不受任
何影響。出現 MINOR 更新時,PATCH 通常會被設為零。
PATCH
這個新版本沒有加入新功能,而是修正既有的 bug
semver 可讓用戶端決定何時做好使用新版本的準備,甚至決定是否自動使用新版本。例
如,Maven 可讓你提供依賴項目資訊,指出固定值的版本,或某個範圍的版本。如果你
知道特定程式庫的維護者使用 semver,而且你目前使用他們的 v5.0.0 版程式庫,建議你
可以這樣編寫 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
精通機器學習|使用Python

精通機器學習|使用Python

Sarah Guido, Andreas C. Mueller
数字化转型:企业破局的34 个锦囊

数字化转型:企业破局的34 个锦囊

Gary O’Brien, Xiao Guo, Mike Mason

Publisher Resources

ISBN: 9789865021740