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 15 KiB

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