PageRenderTime 26ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/en/misc/module-release-process.md

https://github.com/masir/sapphire
Markdown | 242 lines | 167 code | 75 blank | 0 comment | 0 complexity | 324306d8440017c8f1ad69d6df2a18de MD5 | raw file
  1. # Module Maintenance and Release Procedures
  2. ## Creating a module
  3. One of the best ways that you can contribute to SilverStripe is by developing a module for SilverStripe.
  4. If you do, we would love to host your module and have you become an official module maintainer on our site.
  5. Please read our ["Contributing to SilverStripe"](http://silverstripe.org/contributing-to-silverstripe/) overview.
  6. Once you have created a module, login at [silverstripe.org](http://silverstripe.org) and
  7. [submit your module](http://silverstripe.org/modules/manage/add)
  8. It's very important to us that users of SilverStripe can come to expect a level of quality from the core product and any
  9. modules running on it. In order to provide this, we require certain things from module maintainers.
  10. <div class="hint" markdown="1">
  11. The following documentation describes aspects of subversion, you can read about similiar
  12. strategies for git on a [free online book](http://progit.org/book).
  13. </div>
  14. ### Principles
  15. Strive for features you add to the CMS to be innovatively usable by a content editor rather than a web-developer.
  16. Think Wordpress and Apple. Most modules should work by merely placing the code in your SilverStripe installation and
  17. running /dev/build. Provide a default set of configuration options that are easily changed in `_config.php`
  18. (for instance the `ecommerce` module works out of the box, and you can easily set up a payment provider), aiding a pleasant
  19. user experience.
  20. ### Code
  21. Each line of code you write should be version controlled, in version control systems like
  22. [subversion](http://subversion.tigris.org) or [Git](http://gitscm.com). There's lots of services that are freely
  23. available for opensource projects, including wiki and bugtracker functionality
  24. (e.g. [Google Code for Subversion](http://code.google.com) or [Github for Git](http://github.com)).
  25. * Add your module to [silverstripe.org/modules](http://silverstripe.org/modules) (and keep the version compatibility information current)
  26. * Follow our [coding-conventions](coding-conventions)
  27. * Write unit tests and functional tests covering code bundled with the module - see [testing-guide](/topics/testing)
  28. * Ensure your code is [localizable](/topics/i18n)
  29. ### Maintenance
  30. * Create releases (see ["Module Releases"](#module-releases) below)
  31. * Ensure that your module is patched to always work with the latest SilverStripe release, and note these compatibilities on
  32. your modules page on silverstripe.org
  33. * Be involved in our community
  34. * Subscripe to our developer mailing list and be available to answer questions on the forum.
  35. * Attend [irc:our weekly core discussions on IRC](irc/our weekly core discussions on IRC) as regularly as you can.
  36. * Create an **issue tracker** so your users can file bugs and feature requests (see ["Feedback and Bugtracking"](module-release-process#feedback-and-bugtracking) below)
  37. * Create a **roadmap** and **milestones** outlining future release planning
  38. ### Feedback and Bugtracking
  39. Both Google Code and github.com provide their own bugtracker - we encourage you to use any built-in tools that come with
  40. your version control hoster. Most Silverstripe-maintained modules have their bugtracker on
  41. [open.silverstripe.org](http://open.silverstripe.org).
  42. Providing bugtracking is a major form of communicating with your users in an efficient way, and will provide a good overview
  43. of outstanding work and the stability of your code to an interested user.
  44. If the user community finds bugs that shouldn't be included in the next stable release, you will need to release another
  45. release candidate. If your release candidate is found to be stable, then you can create the stable release.
  46. ### Documentation
  47. You should have both **developer documentation** and **user documentation**, and keep them updated with your releases.
  48. See [Producing OSS: "Documentation"](http://producingoss.com/en/getting-started.html#documentation) and our
  49. [contributing guide](contributing#writing-documentation).
  50. ### README file
  51. Each module should have a `README.md file` in the project root in
  52. [markdown format](http://daringfireball.net/projects/markdown/), roughly following this template:
  53. # <MODULENAME> Module
  54. ## Maintainer Contact
  55. * <FULLNAME> (Nickname: <NICKNAME>, <EMAIL>)
  56. ## Requirements
  57. * <Specific SilverStripe version, PHP, MySQL, ...>
  58. ## Documentation
  59. <Links to the wiki, blog posts, etc>
  60. ## Installation Instructions
  61. <Step by step instructions>
  62. ## Usage Overview
  63. <Highlevel usage, refer to wiki documentation for details>
  64. ## Known issues
  65. <Popular issues, how to solve them, and links to tickets in the bugtracker>
  66. ### The docs/ folder ###
  67. The `README.md` file might get a bit long for bigger modules, and you might want to break it up into multiple files
  68. that you can link from the `README.md` file. Example:
  69. mymodule/
  70. README.md
  71. code/
  72. docs/
  73. installation.md
  74. tutorial.md
  75. howto-search-mymodule.md
  76. The ["sapphiredocs" module](http://open.silverstripe.org/browser/modules/sapphiredocs/trunk) can be used
  77. to list and render content inside a `docs/` folder (although it is not required, Markdown is designed
  78. to be readable in plain text as well).
  79. ### What do you get?
  80. In return for all your hard work in putting a high-quality module on the site, the SilverStripe project has the following
  81. options to support you:
  82. * Use of [trac](http://open.silverstripe.org) to keep your bugs and feature requests organised
  83. * Advertising of your module on the http://silverstripe.org/modules/ modules page once it has reached a beta stage and shown
  84. to meet our requirements above.
  85. * We might showcase your module on our blog and/or newsletter, when it's first released and/or when a major version with
  86. significant new features is released. We'll work with you to publicise it on other blogs too (it helps if you deliver
  87. screenshots and screencasts)
  88. * More influence in suggesting changes to the core product
  89. * Kudos on [Ohloh](http://www.ohloh.net/projects/5034?p=SilverStripe+CMS)
  90. ## Releasing a Module
  91. If you are a module maintaienr, you will be responsible for creating new releases of the module.
  92. Releases are important for each codebase to provide stability for its users,
  93. and clearly communicate dependencies/requirements.
  94. ### Release Branches
  95. In order to ensure stability, the first thing we do when making a release is to create a release branch. This branch
  96. will exist for the duration of the testing and release candidate phase. The key is that **you should only commit
  97. bugfixes to this branch**. This lets you focus on getting a stable version of module ready for release, and new
  98. features can still be added to trunk.
  99. Creating a release branch is a simple `svn cp` command. In the example below, (modulename) would be something like
  100. "ecommerce" or "flickrservice", and (releasenumber) would be something like "0.2.1" (see
  101. [Producing OSS: Release Numbering](http://producingoss.com/en/development-cycle.html#release-numbering))
  102. svn cp http://svn.silverstripe.com/open/modules/(modulename)/trunk http://svn.silverstripe.com/open/modules/(modulename)/branches/(releasenumber)
  103. Once you have created a release branch, you should do some testing of the module yourself. Try installing it on a new
  104. site, and existing site, use the different features, and if possible, install on a couple of different servers.
  105. See [SVN Book: "Release Branches"](http://svnbook.red-bean.com/en/1.5/svn.branchmerge.commonpatterns.html#svn.branchmerge.commonpatterns.release),
  106. [Producing OSS: "Release Branches"](http://producingoss.com/en/release-branches.html) and
  107. [Producing OSS: "Stabilizing a release"](http://producingoss.com/en/stabilizing-a-release.html) for more details.
  108. ### Release Candidates
  109. Once you've done your own testing, it's time to create a release candidate (RC). This is a copy of your module that
  110. will be sent to the developer community for testing and feedback. Creating a release candidate is a matter of executing
  111. a `svn cp` command.
  112. Note: If you are the only developer on the module, and you aren't going to be creating any new features for the duration
  113. of the release cycle, then you can get away with creating your RCs directly from trunk instead of creating a release
  114. branch. For major modules, we advise against this, but for very simple modules, going through the whole release process
  115. might be overkill.
  116. svn cp http://svn.silverstripe.com/open/modules/(modulename)/branches/(releasenumber) http://svn.silverstripe.com/open/modules/(modulename)/tags/rc/(releasenumber)-rc1
  117. svn co http://svn.silverstripe.com/open/modules/(modulename)/tags/rc/(releasenumber)-rc1 (modulename)
  118. tar czf (modulename)_(releasenumber)-rc1.tar.gz (modulename)
  119. See ["ReleaseBranches" chapter](http://svnbook.red-bean.com/en/1.5/svn.branchmerge.commonpatterns.html#svn.branchmerge.commonpatterns.release)
  120. and ["Tags" chapter](http://svnbook.red-bean.com/en/1.5/svn.branchmerge.tags.html).
  121. ### Stabilizing A Release
  122. After you have put a release candidate out for testing and no-one has found any bugs that would prevent a release, you
  123. can create the stable release! Please: **The stable release should always be a copy of a release candidate**. Even if
  124. "there's just one tiny bug to fix", you shouldn't release that bug fix onto a stable release - there is always the risk
  125. that you inadvertently broke something! As you might guess, `svn cp` is used to create the final release, and then an
  126. export to a tar.gz.
  127. svn cp http://svn.silverstripe.com/open/modules/(modulename)/tags/rc/(releasenumber)-rc2 http://svn.silverstripe.com/open/modules/(modulename)/tags/(releasenumber)
  128. svn export http://svn.silverstripe.com/open/modules/(modulename)/tags/(releasenumber) (modulename)
  129. tar czf (modulename)_(releasenumber).tar.gz (modulename)
  130. ### Announcing a Release or Release Candidate
  131. * See [Producing OSS: "Announcing Releases"](http://producingoss.com/en/testing-and-releasing.html#release-announcement)
  132. * Update your [documentation](module-release-process#documentation) in the sourcecode, wiki and README
  133. * Add your release to the [silverstripe.org/modules](http://silverstripe.org/modules) listing
  134. * Announce the release on [silverstripe-announce](http://groups.google.com/group/silverstripe-announce). Include a
  135. [changelog](module-release-process#changelogs), the download link and instructions for filing bug reports.
  136. * If this release is a major release, our [marketing guys](http://silverstripe.com/contact/) will strive to announce it
  137. on the main [silverstripe.com blog](http://silverstripe.com/blog) as well
  138. ### Changelogs
  139. Each release you make should contain `CHANGELOG` file in the project root with a highlevel overview of additions and
  140. bugfixes in this release. The `svn log` command gives you all commit messages for a specific project, and is a good
  141. start to build a changelog (see ["Examining historical changes" chapter](http://svnbook.red-bean.com/en/1.5/svn.tour.history.html)).
  142. Depending on the volume of changes, it is preferred that you summarize these messages in a more "digestible"
  143. form (see [Producing OSS: "Changes vs. Changelog"](http://producingoss.com/en/packaging.html#changelog)).
  144. A good `CHANGELOG` example from the subversion project itself:
  145. Version 1.5.2
  146. (29 Aug 2008, from /branches/1.5.x)
  147. http://svn.collab.net/repos/svn/tags/1.5.2
  148. User-visible changes:
  149. * Set correct permissions on created fsfs shards (r32355, -7)
  150. * Pass client capabilities to start-commit hook (issue #3255)
  151. * Disallow creating nested repositories (issue #3269)
  152. Developer-visible changes:
  153. * make libsvn_ra_neon initialization thread-safe (r32497, r32510)
  154. Version 1.5.1
  155. (24 Jul 2008, from /branches/1.5.x)
  156. http://svn.collab.net/repos/svn/tags/1.5.1
  157. ...
  158. ### Release Branch Maintenance
  159. This is also the time to remove the release branch from the subversion tree - we don't want to have lots of branches on
  160. the source tree to confuse everyone. However, before you do this, you will need to merge your changes back to the
  161. trunk.
  162. ## See Also
  163. * [Module Development](/topics/module-development)
  164. * [Documentation Guide](contributing#writing-documentation)
  165. * [Contributing to SilverStripe](http://silverstripe.org/contributing-to-silverstripe/)
  166. * [Submit your Module](http://silverstripe.org/modules/manage/add)
  167. * [subversion](subversion)