|
| 1 | +# Development Guidelines |
| 2 | + |
| 3 | +This document describes tools, tasks and workflow that one needs to be familiar with in order to effectively maintain |
| 4 | +this project. If you use this package within your own software as is but don't plan on modifying it, this guide is |
| 5 | +**not** for you. |
| 6 | + |
| 7 | +## Tools |
| 8 | + |
| 9 | +* [Phing](http://www.phing.info/): used to run predefined tasks. Installed via Composer into the vendor directory. You |
| 10 | + can run phing but using the command line script `./vendor/bin/phing` or you can put it on your PATH. |
| 11 | +* [Composer](https://getcomposer.org/): used to manage dependencies for the project. |
| 12 | + |
| 13 | +## Tasks |
| 14 | + |
| 15 | +### Testing |
| 16 | + |
| 17 | +This project's tests are written as PHPUnit test cases. Common tasks: |
| 18 | + |
| 19 | +* `./vendor/bin/phing test` - run the test suite. |
| 20 | + |
| 21 | +### Releasing |
| 22 | + |
| 23 | +In order to create a release, the following should be completed in order. |
| 24 | + |
| 25 | +1. Ensure all the tests are passing (`./vendor/bin/phing test`) and that there is enough test coverage. |
| 26 | +1. Make sure you are on the `master` branch of the repository, with all changes merged/commited already. |
| 27 | +1. Update the version number in the source code and the README. See [Versioning](#versioning) for information |
| 28 | + about selecting an appropriate version number. Files to change: |
| 29 | + - src/OpenTok/Util/Client.php |
| 30 | + - sample/HelloWorld/composer.json |
| 31 | + - sample/Archiving/composer.json |
| 32 | + - README.md |
| 33 | +1. Commit the version number change with the message "Update to version x.x.x", substituting the new version number. |
| 34 | +1. Create a git tag: `git tag -a vx.x.x -m "Release vx.x.x"` |
| 35 | +1. Change the version number for future development by adding "-alpha.1" in each file, then make another commit with the |
| 36 | + message "Begin development on next version". |
| 37 | +1. Push the changes to the source repository: `git push origin master` |
| 38 | +1. Create a zip for uploading the release to Github Releases |
| 39 | + |
| 40 | +## Workflow |
| 41 | + |
| 42 | +### Versioning |
| 43 | + |
| 44 | +The project uses [semantic versioning](http://semver.org/) as a policy for incrementing version numbers. For planned |
| 45 | +work that will go into a future version, there should be a Milestone created in the Github Issues named with the version |
| 46 | +number (e.g. "v2.2.1"). |
| 47 | + |
| 48 | +During development the version number should end in "-alpha.x" or "-beta.x", where x is an increasing number starting from 1. |
| 49 | + |
| 50 | +### Branches |
| 51 | + |
| 52 | +* `master` - the main development branch. |
| 53 | +* `feat.foo` - feature branches. these are used for longer running tasks that cannot be accomplished in one commit. |
| 54 | + once merged into master, these branches should be deleted. |
| 55 | +* `vx.x.x` - if development for a future version/milestone has begun while master is working towards a sooner |
| 56 | + release, this is the naming scheme for that branch. once merged into master, these branches should be deleted. |
| 57 | + |
| 58 | +### Tags |
| 59 | + |
| 60 | +* `vx.x.x` - commits are tagged with a final version number during release. |
| 61 | + |
| 62 | +### Issues |
| 63 | + |
| 64 | +Issues are labelled to help track their progress within the pipeline. |
| 65 | + |
| 66 | +* no label - these issues have not been triaged. |
| 67 | +* `bug` - confirmed bug. aim to have a test case that reproduces the defect. |
| 68 | +* `enhancement` - contains details/discussion of a new feature. it may not yet be approved or placed into a |
| 69 | + release/milestone. |
| 70 | +* `wontfix` - closed issues that were never addressed. |
| 71 | +* `duplicate` - closed issue that is the same to another referenced issue. |
| 72 | +* `question` - purely for discussion |
| 73 | + |
| 74 | +### Management |
| 75 | + |
| 76 | +When in doubt, find the maintainers and ask. |
0 commit comments