You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReleaseInstructions 14 kB

10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. Instructions for making a Release:
  2. Authors: Conor MacNeill
  3. Stefan Bodewig
  4. Magesh Umasankar
  5. Antoine Levy-Lambert
  6. Note: This document was updated in the context of releasing Ant
  7. 1.9.7 which was the first release cut from the 1.9.x branch.
  8. Please interpret the branch names, tags, etc. according to
  9. your context.
  10. It reflects the way Stefan prefers to cut the release, parts of
  11. this process haven't even been discussed on the dev list and may
  12. change with later releases.
  13. 1. Propose a release plan for vote. This should set out the timetable for
  14. the release under ideal circumstances.
  15. In reality, you send a note to the list that you intend to cut the
  16. release and wait for a few days whether anybody objects.
  17. We haven't created extra branches for releases in a long time and
  18. with our new 1.9.x LTS policy there is a permanent branch for
  19. Java5 compatible releases anyway. So no extra branch for the
  20. releases is needed.
  21. This document assumes you are familiar with git
  22. https://git-scm.com/book/en/v2/
  23. may be a good guide if you are not.
  24. 2. Ensure you have all the external libraries that Ant uses in your
  25. lib/optional directory. All dependencies are either provided by
  26. JDK 1.5.0 or downloadable using
  27. ant -f fetch.xml -Ddest=optional
  28. To find out whether you have all the libraries you need, execute
  29. the build with -verbose option and scan for lines beginning with
  30. "Unable to load...".
  31. Also check the NOTICE file to make sure it has the correct
  32. Copyright year. If the year isn't right, update that file to use
  33. the right year and commit and push the change upstream, before
  34. starting any release process.
  35. You will need to have the snapcraft CLI tool installed in order to
  36. create and publish snap archives. See
  37. https://docs.snapcraft.io/snapcraft-overview
  38. Also you will need a launchpad id that is a collaborator of Ant's
  39. snapcraft store organization, Stefan can add you.
  40. 3. We don't want tags for failed votes to end up on our branches so
  41. the release is first created from a detached head.
  42. Checkout the HEAD of the 1.9.x branch as a detached head:
  43. $ git checkout 1.9.x^0
  44. 4. Make sure that your directory tree is clean by running git status.
  45. Some tests leave behind leftovers which end up in the source
  46. distribution otherwise.
  47. 5. Set the version number in several files to the required new
  48. versions. These are:
  49. * manual/cover.html (version should already be correct here)
  50. * manual/credits.html (version should already be correct here)
  51. * build.xml properties : project.version,manifest-version,pom.version
  52. * POM files under src/etc/poms and subdirectories
  53. if you've got mvn installed
  54. $ mvn versions:set -DnewVersion=1.9.7 -DgenerateBackupPoms=false
  55. inside src/etc/poms should do the trick.
  56. * ivy.xml in release subdirectory (version should already be correct here)
  57. * WHATSNEW (version should already be correct here)
  58. * src/etc/testcases/taskdefs/conditions/antversion.xml (version should already be correct here)
  59. * snap/snapcraft.yaml - change the value for "version" attribute. Plus, change the value for "grade"
  60. to "stable".
  61. 6. Next bootstrap, build and run the tests.
  62. $ ./bootstrap.sh
  63. $ ./build.sh
  64. $ ./build.sh test
  65. # if you've got maven installed
  66. $ mvn -f src/etc/poms/pom.xml -DskipTests package
  67. 7. Then build the distribution. It is important that this be a clean
  68. build.
  69. # clean
  70. $ rm -rf bootstrap build dist distribution java-repository target
  71. $ ./build.sh dist-lite
  72. $ ./dist/bin/ant -nouserlib -lib lib/optional distribution
  73. build.xml specifies that the code should be compiled with
  74. source=1.5 and target=1.5.
  75. 8. Commit your changes, tag them, push them.
  76. $ git tag -s -m "Tagging RC1 for version 1.9.7 of Ant" ANT_197_RC1
  77. $ git push --tags
  78. 9. Ensure that the GPG key you use is inside the KEYS file in Ant's
  79. git repository
  80. <https://gitbox.apache.org/repos/asf?p=ant-antlibs-common.git;a=blob;f=KEYS;h=dc62b011b1b429bd6de913f8f2bce79b715f96db;hb=HEAD>
  81. - and that you copy the KEYS file to /www/www.apache.org/dist/ant
  82. Also make sure you have sent the key that you use to a public
  83. keyserver.
  84. 10. Sign the distribution files
  85. There are two aproaches, one uses Ant and a few libraries, the
  86. other requires you to run gnupg manually. The first version didn't
  87. work for Stefan when he built the first release candidate for
  88. 1.9.7.
  89. a. Using the script release/signit.xml
  90. This script requires using commons-openpgp to sign the artefacts,
  91. This tool can be checked out from
  92. https://svn.apache.org/repos/asf/commons/sandbox/openpgp/trunk
  93. You have to build it using maven.
  94. $ mvn install
  95. The script assumes commons-openpgp (and bouncycastle) are in your
  96. local maven repository.
  97. You can create a property file gnupg.properties in your home directory
  98. with your key id - like
  99. keyid=5F6B8B72
  100. or use -Dkeyid
  101. and pass your key passphrase on the command line with -Dpassword=****
  102. $ ./build.sh -f release/signit.xml -Dpassword=****
  103. b. Using gpg
  104. $ for i in distribution/*/*.zip distribution/*/*.gz distribution/*/*.bz2 distribution/*/*.xz; do gpg --use-agent --detach-sign --armor $i; done
  105. $ for i in java-repository/org/apache/ant/ant*/*/*.jar java-repository/org/apache/ant/ant*/*/*.pom; do gpg --use-agent --detach-sign --armor $i; done
  106. 11. Convert the part of the WHATSNEW file covering the changes
  107. since the last release into HTML for the README file on the
  108. website. See the previous release directories for examples of these files.
  109. Use the target txt2html of docs.xml
  110. $ ./build.sh -f docs.xml txt2html
  111. This target generates a file build/html/WHATSNEW.html
  112. Add an html head element with a title like "Release Notes of Apache Ant
  113. 1.9.7" (from the default txt2html)
  114. Cut all sections about previous releases to keep only the current release,
  115. and save as RELEASE-NOTES-1.9.7.html inside the distribution folder.
  116. Copy the contents of RELEASE-NOTES-1.9.7.html also into README.html
  117. 12. The distribution is now ready to go.
  118. Create a SVN sandbox on your computer with https://dist.apache.org/repos/dist/dev/ant in it
  119. Copy the distribution folder to the location of the sandbox.
  120. svn add the files and commit into https://dist.apache.org/repos/dist/dev/ant
  121. 13. Upload the maven artifacts located under java-repository/org/apache/ant
  122. these artifacts comprise currently for each ant jar of one POM
  123. file, the corresponding jar file and the corresponding GPG
  124. signatures (x.pom, x.jar, x.pom.asc, x.jar.asc) SHA1 are
  125. generated by ivy during the upload
  126. to
  127. https://repository.apache.org (nexus repository)
  128. using the build file release/upload.xml - this requires Ivy
  129. $ ./build.sh -Dupload.user=foo -Dupload.password=secret -lib location_of_ivy_jar -f release/upload.xml
  130. After the upload, you need to access the web interface of nexus
  131. under https://repository.apache.org login using your Apache
  132. credentials in the left pane, below "build promotion", click on
  133. the "Stagings Repositories" links expand org.apache.ant select the
  134. checkbox next to the upload that you just did click the button
  135. "Close" on the top of the table listing the uploads make a note of
  136. the location of the staging repository for the vote email
  137. 14. Create the Snap archive and publish it
  138. You may need to login first
  139. $ snapcraft login
  140. And then build and publish
  141. $ snapcraft clean
  142. $ snapcraft snap
  143. $ snapcraft upload --release=1.9/candidate ant_*.snap
  144. This will publish the new release snap to the 1.9 track on the
  145. candidate risk level. It will be moved to stable, once the vote
  146. has passed.
  147. 15. Once this is committed send a release vote email on dev@ant.
  148. The email will typically mention :
  149. - the git tag for the release including commit hash,
  150. - the location of the tarballs, including revision number in
  151. dist.apache.org repository
  152. - the URL for the maven artifacts
  153. The vote will only pass if at least three PMC members have voted +1
  154. and more +1s than -1s have been cast. The vote will run for 3 days.
  155. 16. If the vote fails, address the problems and recreate the next RC
  156. build.
  157. 17. Once the vote has passed, tag the last RC created with the final tag
  158. $ git tag -s -m "Tagging version 1.9.7 of Ant" rel/1.9.7 HASH_OF_LAST_RC
  159. $ git push --tags
  160. 18. The distrib artifacts should be published the apache dist. It is
  161. managed via svnpubsub so the release should be committed to the
  162. subversion repository
  163. https://dist.apache.org/repos/dist/release/ant/.
  164. * commit the new release files to
  165. https://dist.apache.org/repos/dist/release/ant/[source|binaries|manual].
  166. * Make https://dist.apache.org/repos/dist/release/ant/README.html
  167. point to the new RELEASE-NOTES or a copy of it.
  168. * release the maven artifacts using the web interface of nexus under https://repository.apache.org
  169. login using your Apache credentials
  170. in the left pane, below "build promotion", click on the "Stagings Repositories" links
  171. expand org.apache.ant
  172. select the checkbox next to the upload that you just did
  173. and click the button "Release".
  174. 4 hours later, the artifacts will be in the maven central repository.
  175. 19. Update the Apache Reporter System
  176. https://reporter.apache.org/addrelease.html?ant
  177. 20. Address the available version tags in BugZilla. Create new
  178. milestone 1.9.8 and version 1.9.7.
  179. 21. Add a new release tag to doap_Ant.rdf in Ant's site.
  180. 22. checkout the 1.9.x branch, merge the tag but don't push the
  181. commit
  182. $ git checkout 1.9.x
  183. $ git merge rel/1.9.7
  184. Set the version number in several files to the required version of
  185. the next 1.9.x release. These are:
  186. * manual/cover.html
  187. * manual/credits.html
  188. * build.xml properties : project.version,manifest-version,pom.version
  189. project.version property in build.xml gets bumped to
  190. [newversion]alpha, for example 1.9.8alpha
  191. manifest-version gets bumped to the exact next release number
  192. for example 1.9.8.
  193. pom.version gets bumped to [newversion]-SNAPSHOT
  194. for example 1.9.8-SNAPSHOT.
  195. * POM files under src/etc/poms and subdirectories
  196. if you've got mvn installed
  197. $ mvn versions:set -DnewVersion=1.9.8-SNAPSHOT -DgenerateBackupPoms=false
  198. inside src/etc/poms should do the trick.
  199. * ivy.xml in release subdirectory
  200. * WHATSNEW (add a new section)
  201. * src/etc/testcases/taskdefs/conditions/antversion.xml
  202. * snap/snapcraft.yml (bump version to [newversion]alpha)
  203. Amend the merge commit
  204. $ git add -u
  205. $ git commit -a --amend
  206. $ git push
  207. 22. checkout the master branch, merge the 1.9.x branch
  208. $ git checkout master
  209. $ git merge 1.9.x
  210. $ git push
  211. 24. copy the candidate snaps to stable. First figure out the revision
  212. $ snapcraft status ant
  213. $ snapcraft release ant REVISION 1.9/stable
  214. where REVISION is the revision you want to promote
  215. 25. wait a few hours for the mirrors to catch up
  216. 26. Update the ant.apache.org site :
  217. The website is managed here: https://svn.apache.org/repos/asf/ant/site/ant/
  218. Copy the manual of the release into the production folder - since
  219. the site still uses svn and Ant proper uses git there currently is
  220. no way to use the scm for this.
  221. Update the following files for version number:
  222. * source/antnews.xml (Announcement)
  223. * source/faq.xml (Ant's history details - not for betas)
  224. * source/index.xml (Announcement, latest release details, link to
  225. manual under "Documentation")
  226. * source/srcdownload.xml
  227. * source/bindownload.xml
  228. * source/manualdownload.xml
  229. Generate the html files by invoking 'ant'
  230. Commit the modified/generated files in the 'production' folder, it will go
  231. live on ant.apache.org in a matter on seconds.
  232. 27. At this point in time, the release is done and announcements are made.
  233. PGP-sign your announcement posts.
  234. Apache mailing lists that should get the announcements:
  235. announce@apache.org, dev@ant and user@ant.
  236. 28. You can now reacquaint yourself with your family and friends.
  237. 29. After a few days "svn rm" the older release artifacts and release
  238. notes from https://dist.apache.org/repos/dist/release/ant/
  239. Related Information
  240. https://www.apache.org/dev/#releases
  241. https://commons.apache.org/releases/index.html
  242. https://wiki.apache.org/commons/SigningReleases
  243. Files containing version information
  244. ------------------------------------
  245. * manual/cover.html
  246. * manual/credits.html
  247. * build.xml properties : project.version,manifest-version,pom.version
  248. * POM files under src/etc/poms and subdirectories
  249. * ivy.xml in release subdirectory
  250. * WHATSNEW
  251. * src/etc/testcases/taskdefs/conditions/antversion.xml
  252. * snap/snapcraft.yml
  253. cover.html, credits.html, POM files, antversion.xml should be
  254. adjusted for the [newversion] right after the build and tagging
  255. of the release
  256. build.xml
  257. ---------
  258. right before a release :
  259. the project.version gets bumped to the exact release
  260. number, for instance 1.9.5
  261. right after a release :
  262. project.version property in build.xml gets bumped to
  263. [newversion]alpha, for example 1.9.6alpha
  264. manifest-version gets bumped to the exact next release number
  265. for example 1.9.6
  266. pom.version gets bumped to [newversion]-SNAPSHOT