理解Apache發(fā)布的內(nèi)容和流程
總的來說姑原,Source Release是Apache關(guān)注的重點(diǎn)凭戴,也是發(fā)布的必須內(nèi)容佩抹;而Binary Release是可選項,Dubbo可以選擇是否發(fā)布二進(jìn)制包到Apache倉庫或者發(fā)布到Maven中央倉庫帖世。
請參考以下鏈接休蟹,找到更多關(guān)于ASF的發(fā)布指南:
本地構(gòu)建環(huán)境準(zhǔn)備
主要包括簽名工具、Maven倉庫認(rèn)證相關(guān)準(zhǔn)備
安裝GPG,參見https://www.gnupg.org/download/index.html
如Mac OS
用gpg生成key
根據(jù)提示鸡挠,生成key
查看key id
如果有多個public key辉饱,設(shè)置默認(rèn)key
~/.gnupg/gpg.conf
設(shè)置Apache中央倉庫
Dubbo項目的父pom為apache pom
添加以下內(nèi)容到.m2/settings.xml
?
打包&上傳
從主干分支拉取新分支作為發(fā)布分支,如現(xiàn)在要發(fā)布2.6.4版本拣展,則從2.6.x拉出新分支2.6.4-release彭沼,此后2.6.4 Release Candidates涉及的修改及打標(biāo)簽等都在2.6.4-release分支進(jìn)行,最終發(fā)布完成后合入主干分支备埃。
首先姓惑,在2.6.4-release分支驗證maven組件打包、source源碼打包按脚、簽名等是否都正常工作
用maven-release-plugin發(fā)布
準(zhǔn)備Apache發(fā)布
準(zhǔn)備svn本機(jī)環(huán)境(Apache使用svn托管項目的發(fā)布內(nèi)容)
將dubbo checkout到本地目錄
$ svn checkouthttps://dist.apache.org/repos/dist/dev/incubator/dubbo# 假定本地目錄為 ~/apache/incubator/dubbo
當(dāng)前發(fā)布版本為2.6.4于毙,新建目錄
$cd~/apache/incubator/dubbo# dubbo svn根目錄$ mkdir 2.6.4
添加public key到KEYS文件。KEYS主要是讓參與投票的人在本地導(dǎo)入辅搬,用來校驗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要同時發(fā)布
# 到dubbo項目distribution的module下唯沮,執(zhí)行:$ 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
證環(huán)節(jié)包含但不限于以下內(nèi)容和形式:
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.
進(jìn)入投票
投票分兩個階段:
Dubbo社區(qū)投票介蛉,發(fā)起投票郵件到dev@dubbo.apache.org。在社區(qū)開發(fā)者Review溶褪,并統(tǒng)計到3個同意發(fā)版的binding票后币旧,即可進(jìn)入下一階段的投票。
Apache社區(qū)投票猿妈,發(fā)起投票郵件到general@apache.org吹菱。在Apache PMC Review,并統(tǒng)計到3個統(tǒng)一發(fā)版的binding票后彭则,即可進(jìn)行正式發(fā)布鳍刷。
郵件模板:
正式發(fā)布
提交https://dist.apache.org/repos/dist/dev/incubator/dubbo目錄下的發(fā)布包到https://dist.apache.org/repos/dist/release/incubator/dubbo/,完成正式發(fā)布俯抖。
發(fā)郵件到dev@dubbo.apache.org和general@apache.org倾剿,通知社區(qū)發(fā)布完成。