美文网首页
如何完成一次Apache的版本发布

如何完成一次Apache的版本发布

作者: 许此一生 | 来源:发表于2018-09-27 17:13 被阅读28次

    理解Apache发布的内容和流程

    总的来说,Source Release是Apache关注的重点,也是发布的必须内容;而Binary Release是可选项,Dubbo可以选择是否发布二进制包到Apache仓库或者发布到Maven中央仓库。

    请参考以下链接,找到更多关于ASF的发布指南:

    Apache Release Guide

    Apache Release Policy

    Maven Release Info

    本地构建环境准备

    主要包括签名工具、Maven仓库认证相关准备

    安装GPG,参见https://www.gnupg.org/download/index.html

    如Mac OS

    用gpg生成key

    根据提示,生成key

    查看key id

    如果有多个public key,设置默认key

    ~/.gnupg/gpg.conf

    设置Apache中央仓库

    Dubbo项目的父pom为apache pom

    添加以下内容到.m2/settings.xml

    打包&上传

    从主干分支拉取新分支作为发布分支,如现在要发布2.6.4版本,则从2.6.x拉出新分支2.6.4-release,此后2.6.4 Release Candidates涉及的修改及打标签等都在2.6.4-release分支进行,最终发布完成后合入主干分支。

    首先,在2.6.4-release分支验证maven组件打包、source源码打包、签名等是否都正常工作

    用maven-release-plugin发布

    准备Apache发布

    准备svn本机环境(Apache使用svn托管项目的发布内容)

    将dubbo checkout到本地目录

    $ svn checkouthttps://dist.apache.org/repos/dist/dev/incubator/dubbo# 假定本地目录为 ~/apache/incubator/dubbo

    当前发布版本为2.6.4,新建目录

    $cd~/apache/incubator/dubbo# dubbo svn根目录$ mkdir 2.6.4

    添加public key到KEYS文件。KEYS主要是让参与投票的人在本地导入,用来校验sign的正确性

    拷贝Dubbo根目录下的source.zip包到svn本地仓库dubbo/2.6.4

    生成sha512签名

    $ shasum -a512dubbo-incubating-2.6.4-source-release.zip>> dubbo-incubating-2.6.4-source-release.zip.sha512

    如果有binary release要同时发布

    # 到dubbo项目distribution的module下,执行:$ mvn install# target目录下,拷贝bin-release.zip以及bin-release.zip.asc到svn本地仓库dubbo/2.6.4# 参考第6步,生成sha512签名

    提交到Apache svn

    $ svn status$ svn commit -m'prepare for 2.6.4 RC1'

    验证Release Candidates

    证环节包含但不限于以下内容和形式:

    Check signatures and hashes are good

    sha512 dubbo-incubating-${release_version}-bin-release.zip.sha512sha512 dubbo-incubating-${release_version}-source-release.zip.sha512

    unzip dubbo-incubating-${release_version}-source-release.zip to the default directory and check the following:

    Directory withincubatorin name

    dubbo-incubating-${release_version}-bin-release

    DISCLAIMER file exists

    LICENSE and NOTICE file exists and contents are good

    All files and no binary files exist

    All files has standard ASF License header

    Can compile from source

    All unit tests can pass

    mvn cleantest# This will run all unit tests# you can also open rat and style plugin to check if every file meets requirements.mvn clean install -Drat.skip=false-Dcheckstyle.skip=false

    Release candidates match with corresponding tags, you can find tag link and hash in vote email.

    进入投票

    投票分两个阶段:

    Dubbo社区投票,发起投票邮件到dev@dubbo.apache.org。在社区开发者Review,并统计到3个同意发版的binding票后,即可进入下一阶段的投票。

    Apache社区投票,发起投票邮件到general@apache.org。在Apache PMC Review,并统计到3个统一发版的binding票后,即可进行正式发布。

    邮件模板:

    正式发布

    提交https://dist.apache.org/repos/dist/dev/incubator/dubbo目录下的发布包到https://dist.apache.org/repos/dist/release/incubator/dubbo/,完成正式发布。

    发邮件到dev@dubbo.apache.org和general@apache.org,通知社区发布完成。

    相关文章

      网友评论

          本文标题:如何完成一次Apache的版本发布

          本文链接:https://www.haomeiwen.com/subject/crneoftx.html