Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. https://plc4x.apache.org/developers/release.html
  2. 进行gpg签名的教程


本文以IoTDB为例,介绍了IoTDB从0.811.0版本发布到0.811.1的流程,本文对于那些使用maven来管理的项目是直接适用的。

...

接下来手动上传上述内容,上传链接  http://keys.gnupg.net


到现在应该能查到了。。。


c.2 寻找你认识的Apache社区的Committer来给你的公钥认证寻找你认识的Apache社区的Committer来给你的公钥认证 

参考链接 https://gist.github.com/F21/b0e8c62c49dfab267ff1d0c6af39ab84 主要都是对方有事情要做,所以就不详细解释了。

...

这个步骤需要使用SVN。MacOS已经默认安装了SVN。

本文以IoTDB从已有0.811.0的情况下发布0.811.1为例。


d.1 在dev分支中添加公钥到KEYS,用于发布RC版本

...

这里有两个情况:

  • 我只是发一个小版本的改动,例如已经有了0.811.0版本,我需要发布0.811.1。特点是:代码仓库中已经有了rel/0.8这个分支。11这个分支。
  • 我要发一个大的版本,特点是:代码仓库中有rel/0.811,但是没有rel/0.912

对于第一种情况,只需要将本地分支切换到远程的这个分支上:

$git checkout -b rel/0.8 11 origin/rel/0.11 

对于第二种情况,需要创建一个新分支rel/0.9,并推送到github上:12,并推送到github上:

$git checkout -b rel/0.912

$git push -u origin rel/0.912

2.1 准备发布的代码

我们以要发布0.811.1为例,假设当前本地工作分支已经切换到了rel/0.8下。11下。

这是当前的分支图,rel/0.8创建后最后一次更新位置如图黄色所示,master则还在不断地前进中。11创建后最后一次更新位置如图黄色所示,master则还在不断地前进中。

首先我们要确定哪些内容需要进入新的release中,例如我们要将1、2放入0.811.1中,那么就通过 `git cherry-pick`的方法逐一地将这两个PR的提交加入到rel/0.8分支中(你可能要解决大量冲突。。)。11分支中(你可能要解决大量冲突。。)。

然后,修改RELEASE_NOTES.md文件,写上本次发布都有什么更新。

...

然后目前为止,准备工作就做好了。

注意,目前为止,pom中的版本号为:0.811.1-SNAPSHOT

然后把本地的所有修改都提交到远端。

当你频繁切换分支时,会遗留一些垃圾文件在本地。例如,master分支中增加了一个文件夹session,而0.8中并没有,当你从master切换到rel11中并没有,当你从master切换到rel/0.8时,session这个文件夹并不能被mvn 11时,session这个文件夹并不能被mvn clean清理掉。

建议先将这些文件夹都删除(根据PLC4X的文档介绍,不删除的话,这些文件都会被打包到source.zip中。。。。)

...

!然后!务必检查所有的版本是否正确。比如如果你是从0.811.0升级成0.811.1,那就:

  • 搜索 /0.811.0/ (包含左右两边的”/“),这样可以把所有文档中的链接替换成/0.811.1/
  • 搜索0.811.0,检查所有文档中出现的和0.811.0版本相关的功能描述是否正确,并修改为0.811.1
  • 搜索0.811.0,注意Java代码中的控制台输出是否需要修改(例如CLI会打印版本号)
  • 注意TsFile的magic number不一定要修改。这个需要讨论着来。
  • 所有 pom 里的 version 的 -SNAPSHOT 不要去掉,去掉之后下边的命令会报错。

...

release note可以从jira来筛选,也可以从github来筛选(推荐,确保修改全部都能找到)。github的搜索方法:在PR的filters输入框中输入: is:pr is:closed base:rel/0.10  11  其中base就是你希望查询合并到哪个分支的PR。

然后维护对应的release-note,在邮件列表发邮件通知下release note,看是否有人修改。

...

保证本地没有 iotdb server在运行,不然测试会端口占用

再确认一下现在在 rel/0.8 分支,别在 11 分支,别在 master 分支

merge 一下远程 rel/0.8 11 分支,确保现在的本地分支是最新的

确认一下本地和远程的 release/0.811.1 的 tag 被删掉了:

删本地 tag:$git tag -d release/0.811.1

删远端 tag:git push origin :refs/tags/release/0.811.1


执行:

$ mvn release:prepare -DautoVersionSubmodules=true -P site

...

b. 希望在github打的tag名字是什么,默认值为rel/0.811.1,注意我们目前使用的命名风格是: release/0.811.1

c. 下一个版本号是什么,默认值一般也是对的。

...

应该能看到刚才mvn release:prepare自动做的git操作,commit日志是:[maven-release-plugin] prepare release release/0.811.1 和 [maven-release-plugin] prepare for next development iteration

...

target目录下:

apache-iotdb-0.811.1-incubating-source-release.zip
apache-iotdb-0.811.1-incubating-source-release.zip.asc
apache-iotdb-0.811.1-incubating-source-release.zip.sha512

distribution/target/目录下:

apache-iotdb-0.811.1-incubating-bin.zip
apache-iotdb-0.811.1-incubating-binbin.zip.asc 
apache-iotdb-0.811.1-incubating-bin.zip.sha512

验证!有问题赶紧改,这里还有悔过的机会,不然RC++

gpg2 --verify target/apache-iotdb-0.911.01-incubating-source-release.zip.asc target/apache-iotdb-0.911.0-incubating1-source-release.zip

gpg2 --verify distribution/target/apache-iotdb-0.911.0-incubating1-bin.zip.asc distribution/target/apache-iotdb-0.911.01-incubating-bin.zip

shasum -a512 target/apache-iotdb-0.911.0-incubating1-source-release.zip

shasum -a512 distribution/target/apache-iotdb-0.911.0-incubating1-bin.zip

然后和.sha512文件对比下,确认一致。

...

删本地 tag:$git tag -d release/0.811.1

删远端 tag:git push origin :refs/tags/release/0.811.1

我的话,没有用rollback这个指令,而是直接覆盖重新再来:

git fetch origin
git reset --hard origin/rel/0.911
git clean -fx -d // To remove ignored and non-ignored directories ⭐
git status // 检查确认一下
git log // 检查确认一下

...

如果close失败了,可以再 close 一下。我遇到了没有找到我的 公钥的问题,但是其实网上可以搜到,再close 一次就可以了。

如果之前的~ 一次就可以了。如果之前的~/.gnupg/gpg.conf中的 key不对,会导致close失败。只能重新3从来过!!!

...

下面暂时以iotdb-dist-dev为根目录,你会看到当前的目录如下图所示(应该没有0.8.1这个文件夹)

然后就按照上图所示,创建0.811.1文件夹,再创建0.811.1/rc1文件夹。

然后从iotdb源码的根目录下的target/checkout/将README.md,README_ZH.mdRELEASE_NOTES.md拷贝进来。

再从iotdb源码/target/checkout/target/apache-iotdb-0.811.1-incubating-source-release.zip* (zip, zip.asc, zip.sha512三个文件)拷贝进来;

再从Iotdb源码/target/checkout/distribution/target/apache-iotdb-0.811.1-incubating-bin.zip* (zip, zip.asc, zip.sha512三个文件)拷贝进来;

然后用svn命令提交:

$ svn add 0.811.1

如果这个目录以及添加了,需要添加 svn add 0.911.01/rc2

$ svn commit -m "perparing RC1 of 0.811.1 of IoTDB release"


在孵化期阶段,release那个svn,最多保留5个版本的下载!如果过多了,请记得删除之前的版本!

...

https://github.com/apache/incubator-iotdb/releases,找到刚打的release,点击edit tag ,选中 This is a pre-release ,然后 Save draft

...

邮件标题:[VOTE] Apache IoTDB 0.811.1 (incubating)   RC2 release

邮件模板:

Hi all,

(这一句是可选的) Apache IoTDB (incubating) IoTDB 0.811.1 is a bug-fix version from 0.811.0. You can get its mainly changes from [5]. 

Apache IoTDB (Incubating) IoTDB 0.8.1 has been staged under [2] and it’s time to vote
on accepting it for release.  All Maven artifacts are available under [1].
If approved we will seek final release approval from the IPMC.
Voting will Voting will be open for 72hr.
A minimum of 3 binding +1 votes and more binding +1 than binding -1
are required to pass.

Release tag: release/0.811.1
Hash for the release tag: 37b213b6ab6fc8ca13ab60f21dff099042a0e295

Per [3] "Before voting +1 [P] PMC members are required to download
the signed source code package, compile it as provided, and test
the resulting executable on their own platform, along with also
verifying that the package meets the requirements of the ASF policy
on releases."

...

[1] https://repository.apache.org/content/repositories/orgapacheiotdb-10051050
[2] https://dist.apache.org/repos/dist/dev/incubator/iotdb/0.811.1/rc2
[3] https://www.apache.org/dev/release.html#approving-a-release
[4] https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release

[5] https://dist.apache.org/repos/dist/dev/incubator/iotdb/0.811.1/rc2/RELEASE_NOTES.md

[6] https://dist.apache.org/repos/dist/dev/incubator/iotdb/KEYS


上面红色的字都是需要改的。

其中tag的hash值可以通过如下命令拿到:

$ git show release/0.811.1 --name-only

4 投票失败了怎么办

投票失败时,需要先清理战场,然后重新发布。

...

删除远端 tag:git push origin :refs/tags/release/0.811.1

删除本地 tag:git tag -d release/0.811.1


然后使用maven插件来管理版本就好:

$ mvn release:prepare -DautoVersionSubmodules=true

...

然后开始修改各种投票中大家发现的问题。并提交到rel/0.811.

之后跳转到步骤3重新开始。


并且投票失败了也要写一个RESULT邮件告知情况和下一步的打算,比如参考以前发布经理的例子:https://lists.apache.org/thread.html/89b0af63c0af7455641f738e2500a8a92a2cb4f9efca5456371bf06f%40%3Cdev.iotdb.apache.org%3E

...

参考例子:(自己写的时候一定要仔细检查更新)

Panel

主题:[RESULT][VOTE] Release Apache IoTDB (Incubating) {current-full-version} RC10.9.0


Hi all,

The vote closes now as 72hr have passed. The vote PASSES with
2 (+1 non-binding) votes from the PPMC, 1 (+1 binding) vote from the IPMC,
1 (+1 non-binding) vote from the rest of the developer community,
and no further 0 or -1 votes.


The vote to release Apache IoTDB (incubating) 0.8.2 has passed with 3 +1 binding votes and 1 +1 non-binding vote.

binding votes:

xxx

xxx

non-binding vote:
xxx

Vote thread:
The vote thread: https://lists.apache.org/thread.html/ee976b92c2a425a3172b840980a59eb2c4dd4361be7c198489010b49%40%3Cdev9653646c533df93e286a512b2b5c544b8d7bc9a565183806feeec642%40%3Cgeneral.iotdbincubator.apache.org%3E

I will now bring the vote to general@incubator.apache.org to get approval by the IPMC.
If this vote passes also, the release is accepted and will be published.

Thank you for your support. / (自由感谢)

Regards,
xxx


感谢的话

你的名字


这个 vote thread 可以去这个网页搜:https://lists.apache.org/list.html?dev@iotdb.apache.org

用 apache 账户登录,找到投票的 thread,然后右边这个 permalink 是永久链接,点进去之后拷贝网址就行了。

如果有分裂开的投票线程,可以直接粘贴多个

Image Removed

订阅 general邮件列表

往 general-subscribe@incubator.apache.org 发一封邮件,然后再确认一下

在孵化器阶段,需要发邮件给general邮件列表  general@incubator.apache.org   ,交给IPMC们投票,通过后才可以。

参考例子:(自己写的时候一定要仔细检查更新),要记得邮件的模板里,什么是IPMC什么是PPMC,要修改正确

...

主题:[VOTE] Release Apache IoTDB 0.9.0

...

The vote will be passed if there is no -1 vote ( as there are 3 IPMC +1 votes already), but we still hope all other IPMCs vote for it.

...

6. General列表投票也通过后怎么办

首先发总结邮件到general邮件列表

参考例子:(自己写的时候一定要仔细检查更新)

...

主题:[RESULT][VOTE] Release Apache IoTDB 0.9.0

...

xxx

...


Image Added


6. 通过后怎么办

...


把发布好的文件从dev仓库中移动到release的svn项目中。

release的svn地址是:https://dist.apache.org/repos/dist/release/incubator/iotdb

如果第一次的话,可以clone这个仓库,然后增加文件,然后提交。

$svn co https://dist.apache.org/repos/dist/release/incubator/iotdb

$cd iotdb

$拷贝文件过来,放在 版本-incubating下,例如 版本下,例如 下面的0.811.1-incubating就是我刚刚放过去的。1就是我刚刚放过去的。



MacBook-Pro-3:iotdb-rel hxd$ tree .
.
├── 0.811.0-incubating
│   ├── README.md
│   ├── RELEASE_NOTES.md
│   ├── apache-iotdb-0.811.0-incubating-bin.zip
│   ├── apache-iotdb-0.811.0-incubating-bin.zip.asc
│   ├── apache-iotdb-0.811.0-incubating-bin.zip.sha512
│   ├── apache-iotdb-0.811.0-incubating-source-release.zip
│   ├── apache-iotdb-0.811.0-incubating-source-release.zip.asc
│   └── apache-iotdb-0.811.0-incubating-source-release.zip.sha512
├── 0.811.1-incubating
│   ├── README.md
│   ├── RELEASE_NOTES.md
│   ├── apache-iotdb-0.811.1-incubating-bin.zip
│   ├── apache-iotdb-0.811.1-incubating-bin.zip.asc
│   ├── apache-iotdb-0.811.1-incubating-bin.zip.sha512
│   ├── apache-iotdb-0.811.1-incubating-source-release.zip
│   ├── apache-iotdb-0.811.1-incubating-source-release.zip.asc
│   └── apache-iotdb-0.811.1-incubating-source-release.zip.sha512
└── KEYS



然后提交:

$svn add 0.811.1-incubating

$svn commit -m "upload 0.811.1 release files"


如果你的keys也修改了,可能还要在更新下keys文件。

...

Apache似乎要求当新版本都同步好后,删除掉旧版本的文件(例如本例中是0.811.0-incubating),但是我查看了几个项目,这个不是绝对要求的。。建议保留一些版本。0),但是我查看了几个项目,这个不是绝对要求的。。建议保留一些版本。

删除方法是用 svn delete命令删除文件夹即可。

例如:$svn delete https://dist.apache.org/repos/dist/release/incubator/iotdb/0.8.0-incubating/ -m"deleted version 0.811.0"

还可以如下删除:

svn delete 要删除的文件或者文件夹

...

https://github.com/apache/incubator-iotdb/releases,把之前this is a pre-release & save draft的改为publish release。

...

git checkout release
git merge release/0.811.1

如果有有冲突,那么全盘接收tag上的修改,可以使用如下命令:

git merge -X theirs release/0.811.1


11. 更新JIRA

  1. Set the released version to "released" and set the "release-date"

  2. Add the next version to the versions.

...