/jEdit/tags/jedit-4-5-pre1/doc/releasing-jedit.txt

# · Plain Text · 233 lines · 200 code · 33 blank · 0 comment · 0 complexity · e31fe534722b687b88a5a609a4a09fdc MD5 · raw file

  1. ==================================================
  2. Packaging jEdit for release
  3. ==================================================
  4. This document contains instructions on how to create and release jEdit for distribution, with all of the installers.
  5. The analogous document for releasing plugins is in the jedit SVN repository under the name "pjo/doc/pjo.txt".
  6. Release Workflow
  7. ================
  8. Before you read this document, be sure to read first the README.SRC.txt, in the root source directory. It contains instructions on how to get and set up Apache Ant, what the targets mean, and what you need to build each kind of package.
  9. Workflow
  10. --------
  11. 1. Execute the BeanShell snippet at the end of this file ("Utilities -> BeanShell -> Evaluate Selection"). This will replace the version tags in this document by actual version numbers for easy copy & paste.
  12. 2. Review http://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches/[branch]/doc/CHANGES.txt for formatting errors (like missing newline characters, wrong indentation or empty blocks), fix them and check them in.
  13. 3. Tag the sourcecode for release in the SVN repository by doing
  14. svn copy https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches/[branch] https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/[tag] -m "Tagging [version] for release."
  15. with the correct version in the second URL and in the commit message
  16. 4. To be sure to work with the exact tagged source, check out the newly tagged source in a new directory by doing
  17. svn checkout https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/[tag]
  18. no matter where. You will find the source in a subfolder [tag] where you executed the command
  19. 5. Copy build.properties from your jEdit source directory to the newly created [tag] source directory if needed. If you don't have it, then create it if needed. You find a template called build.properties.sample in the root directory.
  20. To give an example, in build.properties I customized the following properties:
  21. - wine.executable=wine
  22. - winepath.executable=winepath
  23. - innosetup.compiler.executable=/home/vampire/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe
  24. - innosetup.via.wine=true
  25. - gpg.secring=/home/vampire/.gnupg/secring.gpg
  26. You may not need to customize the same properties than me, e. g. if you are on Windows you don't need to set the three wine properties.
  27. For further information about what you need to build the source, please read README.SRC.txt in the sources root directory.
  28. 6.1. Build the distribution files by doing
  29. ant dist
  30. in the [tag] directory
  31. In the newly created directory [tag]/dist you find [ifdevel]8[/ifdevel][iffinal]13[/iffinal] files:
  32. - jedit[version]manual-a4.pdf
  33. - jedit[version]manual-letter.pdf
  34. - jedit[version]source.tar.bz2
  35. - jedit[version]install.jar
  36. - jedit-[version]-noarch-1sao.tgz
  37. - jedit_[version]_all.deb
  38. - jedit[version]install.exe or jedit[version]-dist-win-finish.tar.bz2
  39. - jedit[version]install.dmg or jedit[version]-dist-mac-finish.tar.bz2
  40. [iffinal] - Packages
  41. - Packages.gz
  42. - Packages.bz2
  43. - Release
  44. - Release.gpg
  45. [/iffinal]
  46. 6.2. If you have jedit[version]-dist-win-finish.tar.bz2 in your [tag]/dist folder you probably don't run a Windows box and don't have wine installed and set up, so please hand over this file to someone (e. g. <Bj??rn "Vampire" Kautler> Vampire@jEdit.org) who does and ask him to unpack the file and run
  47. ant dist-win-finish
  48. and to hand over the resulting file jedit[version]install.exe to you. The requirements for this are described in README.SRC.txt
  49. 6.3. If you have jedit[version]-dist-mac-finish.tar.bz2 in your [tag]/dist folder you probably don't run a Mac OS X box, so please hand over this file to someone (e. g. Bj??rn "Vampire" Kautler <Vampire@jEdit.org>) who does and ask him to unpack the file and run
  50. ant dist-mac-finish
  51. and to hand over the resulting file jedit[version]install.dmg to you. The requirements for this are described in README.SRC.txt
  52. 6.4. After you received the final distribution files jedit[version]install.exe and jedit[version]install.dmg you can delete jedit[version]-dist-win-finish.tar.bz2 and jedit[version]-dist-mac-finish.tar.bz2
  53. [iffinal]
  54. 6.5. If you don't have Release.gpg, you didn't have setup a GPG secring. Either create a GPG secring, run
  55. ant dist-sign-deb-Release
  56. , upload the public key to a public keyserver and make sure your key is mentioned on http://jedit.org/index.php?page=download&platform=unix#option_two so the users know the key is valid for signing jEdit releases. Alternatively send Release to someone whose key is already mentioned on the download page (e. g. Bj??rn "Vampire" Kautler <Vampire@jEdit.org>) and ask him to put Release in the dist folder, to run
  57. ant dist-sign-deb-Release
  58. and to hand over the resulting file Release.gpg to you. The second way is preferable if you only create a release once or from time to time as a new key means the user will get confused and has to react for verifying and installing the new key.
  59. [/iffinal]
  60. 7. - Connect to the SourceForge servers via one of the methods described in https://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download
  61. - Add the sub-folder "[version]" under "/home/frs/project/j/je/jedit/jedit[ifdevel]-devel[/ifdevel]"
  62. - Upload the 8 final distribution files [iffinal]starting with "jedit" [/iffinal]to the newly created folder on the SourceForge servers
  63. [iffinal] - Upload the 5 remaining distribution files not starting with "jedit" to the folder "/home/frs/project/j/je/jedit" on the SourceForge servers.
  64. [/iffinal]
  65. 8. - Go to https://sourceforge.net/projects/jedit/files/jedit[ifdevel]-devel[/ifdevel]/[version]/
  66. - Make the following settings for each file after clicking on the respective "i" icon
  67. - jedit_[version]_all.deb
  68. - Download Button: Debian Installer
  69. - Default Download For: <none>
  70. - jedit[version]source.tar.bz2
  71. - Download Button: Source Package
  72. - Default Download For: <none>
  73. - jedit[version]install.jar
  74. - Download Button: Java based Installer
  75. - Default Download For: [ifdevel]<none>[/ifdevel][iffinal]linux, bsd, solaris, others[/iffinal]
  76. - jedit[version]manual-letter.pdf
  77. - Download Button: Manual in Letter Paper size
  78. - Default Download For: <none>
  79. - jedit[version]manual-a4.pdf
  80. - Download Button: Manual in A4 Paper size
  81. - Default Download For: <none>
  82. - jedit[version]install.dmg
  83. - Download Button: Mac OS X Installer
  84. - Default Download For: [ifdevel]<none>[/ifdevel][iffinal]mac[/iffinal]
  85. - jedit[version]install.exe
  86. - Download Button: Windows Installer
  87. - Default Download For: [ifdevel]<none>[/ifdevel][iffinal]windows[/iffinal]
  88. - jedit-[version]-noarch-1sao.tgz
  89. - Download Button: Slackware Installer
  90. - Default Download For: <none>
  91. 9. Update the website in the following places and also update this state in SVN:
  92. - Open sftp://<your sf username>,jedit@web.sourceforge.net/home/groups/j/je/jedit/htdocs/download.html e. g. in jEdit with installed FTP plugin and update the website for the new release, means the filenames, filesizes and amount of pages in the User's Guides
  93. - Open sftp://<your sf username>,jedit@web.sourceforge.net/home/groups/j/je/jedit/htdocs/jEdit-version.txt e. g. in jEdit with installed FTP plugin and update the versions in the file, which is needed by the LatestVersion Plugin
  94. - Open sftp://<your sf username>,jedit@web.sourceforge.net/home/groups/j/je/jedit/htdocs/CHANGES44.txt e. g. in jEdit with installed FTP plugin and copy the contents of [tag]/doc/CHANGES.txt to this file
  95. - Open sftp://<your sf username>,jedit@web.sourceforge.net/home/groups/j/je/jedit/htdocs/index.php e. g. in jEdit with installed FTP plugin and update the version number and the Last Site Update date
  96. - Open sftp://<your sf username>,jedit@web.sourceforge.net/home/groups/j/je/jedit/htdocs/devel.html e. g. in jEdit with installed FTP plugin and add a line for [version] in the Release Schedule
  97. 10. Update the plugin wizard
  98. - Go to http://plugins.jedit.org/wiz/release_add.php?package_id=24
  99. - Enter the Version "[version]"
  100. - Switch "Head of Branch" to "[ifdevel]devel[/ifdevel][iffinal]main[/iffinal]"
  101. - Check the "Remove" checkbox for the jEdit dependency
  102. - Switch the "Low Version" of the JDK dependency to "1.6 [jdk-1.6]"
  103. - Click "Update Dependencies"
  104. - Click "Create Release"
  105. 11. Send an announcement eMail to the jEdit-announce list. The announcement should contain some announcing text and in the end the contents of [tag]/doc/CHANGES.txt for this release.
  106. You have to be set up to be able to post to jEdit-announce list.
  107. The mail should automatically get forwarded to the jedit-users list, but for that you have to be subscribed to that list too.
  108. 12. Ask Vampire <Vampire@jEdit.org> (Vampire0@#jEdit@chat.freenode.net) to update the topic of the IRC Channel
  109. 13. Spread the word about the new release whereever possible e. g.:
  110. - On Twitter
  111. - On Google+
  112. - On Facebook
  113. - Send a mail to the Community Growth Hacker of SourceForge for promotion of the release, currently this is Elizabeth Naramore <elizabethn@sourceforge.net>
  114. - Send a mail to Heise for inclusion in the weekly Heise Developer Snapshots at developer@ix.de
  115. 14. Delete the [tag] folder
  116. 15. Update the version number on the release branch
  117. - Add the following section to doc/CHANGES.txt
  118. {{{ Version [nextVersion]
  119. Thanks to for contributing to this release.
  120. {{{ Bug Fixes
  121. }}}
  122. {{{ Miscellaneous
  123. }}}
  124. {{{ API Changes
  125. }}}
  126. {{{ Editing
  127. }}}
  128. }}}
  129. - Update the build number in org/gjt/sp/jedit/jEdit.java getBuild() method to
  130. return "[nextBuild]";
  131. - Update the version and build number in build.xml to
  132. <property name="jedit.version"
  133. value="[nextVersion]" />
  134. <property name="jedit.build.number"
  135. value="[nextBuild]" />
  136. - Submit your changes by doing
  137. svn commit -m "Update the version number to [nextVersion]"
  138. in the root source directory
  139. ====================================================================================================
  140. import java.util.regex.Pattern;
  141. file = new File(new File(buffer.getPath()).getParentFile(), "../org/gjt/sp/jedit/jEdit.java");
  142. fileChars = new char[file.length()];
  143. reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
  144. reader.read(fileChars, 0, fileChars.length);
  145. pattern = Pattern.compile("public static String getBuild\\(\\)[^}]+return \"([^\"]{11})\"");
  146. matcher = pattern.matcher(new String(fileChars));
  147. matcher.find();
  148. build = matcher.group(1);
  149. major = Integer.parseInt(build.substring(0,2));
  150. minor = Integer.parseInt(build.substring(3,5));
  151. beta = Integer.parseInt(build.substring(6,8));
  152. bugfix = Integer.parseInt(build.substring(9,11));
  153. branch = major + "." + minor + ".x";
  154. tag = "jedit-"
  155. + major
  156. + "-" + minor
  157. + (beta != 99 ? "-pre" + beta : (bugfix != 0 ? "-" + bugfix : ""));
  158. version = major
  159. + "." + minor
  160. + (beta != 99 ? "pre" + beta : (bugfix != 0 ? "." + bugfix : ""));
  161. nextVersion = major
  162. + "." + minor
  163. + (beta != 99 ? "pre" + (beta + 1) : (beta == 99 ? "." + (bugfix + 1) : ""));
  164. nextBuild = String.format("%02d.%02d.%02d.%02d",
  165. new Object[] { Integer.valueOf(major),
  166. Integer.valueOf(minor),
  167. Integer.valueOf(beta == 99 ? beta : beta + 1),
  168. Integer.valueOf(beta == 99 ? bugfix + 1 : bugfix) });
  169. SearchAndReplace.setBeanShellReplace(false);
  170. SearchAndReplace.setIgnoreCase(false);
  171. SearchAndReplace.setRegexp(false);
  172. SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
  173. buffer.beginCompoundEdit();
  174. SearchAndReplace.setSearchString("[branch]");
  175. SearchAndReplace.setReplaceString(branch);
  176. SearchAndReplace.replaceAll(view);
  177. SearchAndReplace.setSearchString("[tag]");
  178. SearchAndReplace.setReplaceString(tag);
  179. SearchAndReplace.replaceAll(view);
  180. SearchAndReplace.setSearchString("[version]");
  181. SearchAndReplace.setReplaceString(version);
  182. SearchAndReplace.replaceAll(view);
  183. SearchAndReplace.setSearchString("[nextVersion]");
  184. SearchAndReplace.setReplaceString(nextVersion);
  185. SearchAndReplace.replaceAll(view);
  186. SearchAndReplace.setSearchString("[nextBuild]");
  187. SearchAndReplace.setReplaceString(nextBuild);
  188. SearchAndReplace.replaceAll(view);
  189. SearchAndReplace.setRegexp(true);
  190. SearchAndReplace.setBeanShellReplace(true);
  191. SearchAndReplace.setSearchString("\\[ifdevel\\]((?:.|\n)*?)\\[/ifdevel\\]");
  192. SearchAndReplace.setReplaceString(beta != 99 ? "_1" : "");
  193. SearchAndReplace.replaceAll(view);
  194. SearchAndReplace.setSearchString("\\[iffinal\\]((?:.|\n)*?)\\[/iffinal\\]");
  195. SearchAndReplace.setReplaceString(beta != 99 ? "" : "_1");
  196. SearchAndReplace.replaceAll(view);
  197. textArea.replaceSelection("Versions replaced\n");
  198. buffer.endCompoundEdit();
  199. ====================================================================================================
  200. :wrap=soft:maxLineLen=0:folding=indent: