日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時(shí)間:2024/8/23 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 如何完成一次Apache的版本发布 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

理解Apache發(fā)布的內(nèi)容和流程

總的來說,Source Release是Apache關(guān)注的重點(diǎn),也是發(fā)布的必須內(nèi)容;而Binary Release是可選項(xiàng),Dubbo可以選擇是否發(fā)布二進(jìn)制包到Apache倉(cāng)庫(kù)或者發(fā)布到Maven中央倉(cāng)庫(kù)。

請(qǐng)參考以下鏈接,找到更多關(guān)于ASF的發(fā)布指南:

  • Apache Release Guide
  • Apache Release Policy
  • Maven Release Info

本地構(gòu)建環(huán)境準(zhǔn)備

主要包括簽名工具、Maven倉(cāng)庫(kù)認(rèn)證相關(guān)準(zhǔn)備

  • 安裝GPG,參見?https://www.gnupg.org/download/index.html

    • 如Mac OS

      $ brew install gpg $ gpg --version #檢查版本,應(yīng)該為2.x
  • 用gpg生成key

    • 根據(jù)提示,生成key
    $ gpg2 --full-gen-key gpg (GnuPG) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.Please select what kind of key you want:(1) RSA and RSA (default)(2) DSA and Elgamal(3) DSA (sign only)(4) RSA (sign only) Your selection? 1 RSA keys may be between 1024 and 4096 bits long. What keysize do you want? (2048) 4096 Requested keysize is 4096 bits Please specify how long the key should be valid.0 = key does not expire<n> = key expires in n days<n>w = key expires in n weeks<n>m = key expires in n months<n>y = key expires in n years Key is valid for? (0) Key does not expire at all Is this correct? (y/N) yGnuPG needs to construct a user ID to identify your key.Real name: Robert Burrell Donkin Email address: rdonkin@apache.org Comment: CODE SIGNING KEY You selected this USER-ID:"Robert Burrell Donkin (CODE SIGNING KEY) <rdonkin@apache.org>"Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O You need a Passphrase to protect your secret key. # 填入密碼,以后打包過程中會(huì)經(jīng)常用到
    • 查看key id

      $ gpg --list-keys pub rsa4096/28681CB1 2018-04-26 # 28681CB1就是key id uid [ultimate] liujun (apache-dubbo) <liujun@apache.org> sub rsa4096/D3D6984B 2018-04-26# 通過key id發(fā)送public key到keyserver $ gpg --keyserver pgpkeys.mit.edu --send-key 28681CB1 # 其中,pgpkeys.mit.edu為隨意挑選的keyserver,keyserver列表為:https://sks-keyservers.net/status/,因?yàn)橄嗷ブg是自動(dòng)同步的,選任意一個(gè)都可以。
    • 如果有多個(gè)public key,設(shè)置默認(rèn)key

      ~/.gnupg/gpg.conf

      # If you have more than 1 secret key in your keyring, you may want to # uncomment the following option and set your preferred keyid.default-key 28681CB1
  • 設(shè)置Apache中央倉(cāng)庫(kù)

    • Dubbo項(xiàng)目的父pom為apache pom

      <parent><groupId>org.apache</groupId><artifactId>apache</artifactId><version>19</version> </parent>
    • 添加以下內(nèi)容到.m2/settings.xml

      所有密碼請(qǐng)使用[maven-encryption-plugin](http://maven.apache.org/guides/mini/guide-encryption.html)加密后再填入
    <settings> ...<servers><!-- To publish a snapshot of some part of Maven --><server><id>apache.snapshots.https</id><username> <!-- YOUR APACHE LDAP USERNAME --> </username><password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password></server><!-- To stage a release of some part of Maven --><server><id>apache.releases.https</id><username> <!-- YOUR APACHE LDAP USERNAME --> </username><password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password></server>...<!-- gpg passphrase used when generate key --><server><id>gpg.passphrase</id><passphrase><!-- yourKeyPassword --></passphrase></server></servers> </settings>

    ?

  • 打包&上傳

  • 從主干分支拉取新分支作為發(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分支驗(yàn)證maven組件打包、source源碼打包、簽名等是否都正常工作

    $ mvn clean install -Papache-release $ mvn deploy # 將snapshot包推送到maven中央倉(cāng)庫(kù),處于staging狀態(tài)
  • 用maven-release-plugin發(fā)布

    • 先用dryRun驗(yàn)證是否ok

      $ mvn release:prepare -Papache-release -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID -DdryRun=true
    • 驗(yàn)證通過后,執(zhí)行release:prepare
    $ mvn release:clean $ mvn release:prepare -Papache-release -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID # 執(zhí)行完成后:1.生成source.zip包; 2.打出tag,并推送到github倉(cāng)庫(kù); 3.分支版本自動(dòng)升級(jí)為2.6.4-SNAPSHOT,并將修改推送到github倉(cāng)庫(kù)
    • 執(zhí)行release:perform,做正式發(fā)布

      $ mvn -Prelease release:perform -Darguments="-DskipTests" -DautoVersionSubmodules=true -Dusername=YOUR GITHUB ID # 所有artifacts發(fā)布到配置的遠(yuǎn)程maven中央倉(cāng)庫(kù),處于staging狀態(tài)
  • 準(zhǔn)備Apache發(fā)布

  • 準(zhǔn)備svn本機(jī)環(huán)境(Apache使用svn托管項(xiàng)目的發(fā)布內(nèi)容)
  • 將dubbo checkout到本地目錄

    $ svn checkout https://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)入,用來校驗(yàn)sign的正確性
  • 拷貝Dubbo根目錄下的source.zip包到svn本地倉(cāng)庫(kù)dubbo/2.6.4
  • 生成sha512簽名

    $ shasum -a 512 dubbo-incubating-2.6.4-source-release.zip >> dubbo-incubating-2.6.4-source-release.zip.sha512
  • 如果有binary release要同時(shí)發(fā)布

    # 到dubbo項(xiàng)目distribution的module下,執(zhí)行: $ mvn install # target目錄下,拷貝bin-release.zip以及bin-release.zip.asc到svn本地倉(cāng)庫(kù)dubbo/2.6.4 # 參考第6步,生成sha512簽名
  • 提交到Apache svn

    $ svn status $ svn commit -m 'prepare for 2.6.4 RC1'
  • 驗(yàn)證Release Candidates

    證環(huán)節(jié)包含但不限于以下內(nèi)容和形式:

  • Check signatures and hashes are good
  • sha512 dubbo-incubating-${release_version}-bin-release.zip.sha512 sha512 dubbo-incubating-${release_version}-source-release.zip.sha512
  • unzip dubbo-incubating-&dollar;{release_version}-source-release.zip to the default directory and check the following:
    • Directory with?incubator?in 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 clean test # 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)入投票

    投票分兩個(gè)階段:

  • Dubbo社區(qū)投票,發(fā)起投票郵件到dev@dubbo.apache.org。在社區(qū)開發(fā)者Review,并統(tǒng)計(jì)到3個(gè)同意發(fā)版的binding票后,即可進(jìn)入下一階段的投票。
  • Apache社區(qū)投票,發(fā)起投票郵件到general@apache.org。在Apache PMC Review,并統(tǒng)計(jì)到3個(gè)統(tǒng)一發(fā)版的binding票后,即可進(jìn)行正式發(fā)布。
  • 郵件模板:

    Hello Dubbo Community,This is a call for vote to release Apache Dubbo (Incubating) version 2.6.4.The release candidates: https://dist.apache.org/repos/dist/dev/incubator/dubbo/2.6.4/Git tag for the release: https://github.com/apache/incubator-dubbo/tree/dubbo-2.6.4Hash for the release tag: afab04c53edab38d52275d2a198ea1aff7a4f41eRelease Notes: https://github.com/apache/incubator-dubbo/releases/tag/untagged-4775c0a22c60fca55118The artifacts have been signed with Key : 28681CB1, which can be found in the keys file: https://dist.apache.org/repos/dist/dev/incubator/dubbo/KEYSThe vote will be open for at least 72 hours or until necessary number of votes are reached.Please vote accordingly:[ ] +1 approve [ ] +0 no opinion [ ] -1 disapprove with the reasonThanks, The Apache Dubbo (Incubating) Team

    正式發(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ā)布完成。
  • 完成Maven Convenient Binary發(fā)布(可選)

    apache.repository.org?nexus倉(cāng)庫(kù)的權(quán)限已經(jīng)申請(qǐng),參見jira

    之前發(fā)布到maven倉(cāng)庫(kù)的atifacts都處于staging狀態(tài),用Apache?id登錄apache.repository.org,完成發(fā)布。


    原文鏈接
    本文為云棲社區(qū)原創(chuàng)內(nèi)容,未經(jīng)允許不得轉(zhuǎn)載。

    總結(jié)

    以上是生活随笔為你收集整理的如何完成一次Apache的版本发布的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。