博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Change Log应该怎么写?
阅读量:6948 次
发布时间:2019-06-27

本文共 4111 字,大约阅读时间需要 13 分钟。

hot3.png

在工作中需要写很多课程文档,随着不断的迭代,内容也会不断的变化,时间一长,就很可能忘记之前在什么时候做过什么改动了,所以这个时候就需要文档的写作者保持更新 Changelog 来确保每一个协作者都在同一个步伐。

很多人认为更新日志好像是只有「写代码」才需要的一个文档,但是只要涉及到文档协同、对1个文档进行长期的迭代,我们都需要一个更新文档来记录历史变动,这样新的人进来就可以对整个来龙去脉有一个非常直观的了解。

什么是更新日志

那什么是更新日志呢?更新日志(Change Log)是一个由人工编辑,以时间为倒叙的列表。 这个列表记录所有版本的重大变动。

我们来看一个直观的案例。

# Change LogAll notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](http://keepachangelog.com/)and this project adheres to [Semantic Versioning](http://semver.org/).## [Unreleased]### Added- zh-CN and zh-TW translations from @tianshuo.- de translation from @mpbzh.- it-IT translation from @roalz.- sv translation from @magol.- tr-TR translation from @karalamalar.- fr translation from @zapashcanon.### Changed- Start versioning based on the current English version at 0.3.0 to helptranslation authors keep things up-to-date.- Fix typos in zh-CN translation.- Fix typos in pt-BR translation.## [0.3.0] - 2015-12-03### Added- RU translation from @aishek.- pt-BR translation from @tallesl.- es-ES translation from @ZeliosAriex.## [0.2.0] - 2015-10-06### Changed- Remove exclusionary mentions of "open source" since this project can benefitboth "open" and "closed" source projects equally.## [0.1.0] - 2015-10-06### Added- Answer "Should you ever rewrite a change log?".### Changed- Improve argument against commit logs.- Start following [SemVer](http://semver.org) properly.## [0.0.8] - 2015-02-17### Changed- Update year to match in every README example.- Reluctantly stop making fun of Brits only, since most of the world  writes dates in a strange way.### Fixed- Fix typos in recent README changes.- Update outdated unreleased diff link.## [0.0.7] - 2015-02-16### Added- Link, and make it obvious that date format is ISO 8601.### Changed- Clarified the section on "Is there a standard change log format?".### Fixed- Fix Markdown links to tag comparison URL with footnote-style links.## [0.0.6] - 2014-12-12### Added- README section on "yanked" releases.## [0.0.5] - 2014-08-09### Added- Markdown links to version tags on release headings.- Unreleased section to gather unreleased changes and encourage notekeeping prior to releases.## [0.0.4] - 2014-08-09### Added- Better explanation of the difference between the file ("CHANGELOG")and its function "the change log".### Changed- Refer to a "change log" instead of a "CHANGELOG" throughout the siteto differentiate between the file and the purpose of the file — thelogging of changes.### Removed- Remove empty sections from CHANGELOG, they occupy too much space andcreate too much noise in the file. People will have to assume that themissing sections were intentionally left out because they contained nonotable changes.## [0.0.3] - 2014-08-09### Added- "Why should I care?" section mentioning The Changelog podcast.## [0.0.2] - 2014-07-10### Added- Explanation of the recommended reverse chronological release ordering.## 0.0.1 - 2014-05-31### Added- This CHANGELOG file to hopefully serve as an evolving example of a standardized open source project CHANGELOG.- CNAME file to enable GitHub Pages custom domain- README now contains answers to common questions about CHANGELOGs- Good examples and basic guidelines, including proper date formatting.- Counter-examples: "What makes unicorns cry?"

为什么需要更新日志

简单来说,当一群人一起工作的时候,特别是在同一篇文档工作的时候,我们便需要让协作者更好知道每一个版本有哪些区别。

如何写好更新日志

明确了什么是更新日志,以及为什么需要更新日志,我想更重要的应该是如何写好一篇更新日志了。

 是一个致力于规范更新日志的项目,在网站中他提及了:

貌似GNU或者GNU NEWS还是提过些规范的,事实是它们太过简陋了。 开发有那么多种情况,采用那样的规范,确实是不太合适的。

所以项目的发起人认为之前的世界标准并不是足够优质,所以他自己制作了对应的  发布在Github上,在项目中他是这么定义一份优秀的更新日志的:

  • 给人而不是机器写的。记住,要说人话。
  • 快速跳转到任意段。所以采用markdown格式
  • 一个版本对应一个章节。
  • 最新的版本在上,最老的在下面。
  • 所有日期采用'YYYY-MM-DD'这种规范。(例如北京奥运会的2008年8月8日是2008-08-08)这个是国际通用,任何语言 都能理解的,并且还被推荐呢!
  • 标出来是否遵守
  • 每一个软件的版本必须:
    • 标明日期(要用上面说过的规范)
    • 标明分类(采用英文)。规范如下git:
    • 'Added' 添加的新功能
    • 'Changed' 功能变更
    • 'Deprecated' 不建议使用,未来会删掉
    • 'Removed' 之前不建议使用的功能,这次真的删掉了
    • 'Fixed' 改的bug
    • 'Security' 改的有关安全相关bug

另外关于命名规范,他也建议直接将更新日志命名为:CHANGELOG.md,注意大小写。

HISTORY.txtHISTORY.mdHistory.mdNEWS.txtNEWS.mdNews.txtRELEASES.txtRELEASE.mdreleases.md这么 多文件名就太不统一了。

 

转载于:https://my.oschina.net/feanlau/blog/1329779

你可能感兴趣的文章
Android 使用ViewPager结合PhotoView开源组件实现网络图片在线浏览功能
查看>>
GNU Radio中的数据元(Metadata)
查看>>
【JSP开发】URL路径的规范
查看>>
Android学习笔记(3):Android项目结构分析
查看>>
openlayers加载切片地图
查看>>
【Android开发】布局管理器-相对布局
查看>>
A Case about cursor_sharing=FORCE can introduce a execute plan stale
查看>>
[技术点]SQL 多条件查询
查看>>
PHP进阶~1
查看>>
thinking about application known or un-known distributed storage
查看>>
cocos2d::Map
查看>>
【Ajax技术】利用XHR接受与处理XML数据
查看>>
月薪13k的我为什么要转行学Python?
查看>>
节假日是不是一票难求?Python百十行代码帮你实现自动抢票!
查看>>
git 常见错误解决方案集合
查看>>
互联网架构技术面试题——Spring专题面试锦集
查看>>
GMQ打造区块链行业完整产业链,为区块链数字资产发展贡献一份力量
查看>>
js柯里化二三事
查看>>
iOS开发中的AOP利器 - Aspects 源码分析(二)
查看>>
写给自己看的 Flex 布局
查看>>