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

149 lines
4.4 KiB

14 years ago
13 years ago
  1. rebar
  2. =====
  3. rebar is an Erlang build tool that makes it easy to compile and test Erlang
  4. applications, port drivers and releases.
  5. [![Build Status](https://secure.travis-ci.org/rebar/rebar.png?branch=master)](http://travis-ci.org/rebar/rebar)
  6. rebar is a self-contained Erlang script, so it's easy to distribute or even
  7. embed directly in a project. Where possible, rebar uses standard Erlang/OTP
  8. conventions for project structures, thus minimizing the amount of build
  9. configuration work. rebar also provides dependency management, enabling
  10. application writers to easily re-use common libraries from a variety of
  11. locations (git, hg, etc).
  12. Building
  13. --------
  14. Information on building and installing [Erlang/OTP](http://www.erlang.org) can
  15. be found [here](https://github.com/erlang/otp/wiki/Installation) ([more
  16. info](https://github.com/erlang/otp/blob/master/INSTALL.md)).
  17. ### Dependencies
  18. To build rebar you will need a working installation of Erlang R13B03 (or later).
  19. Should you want to clone the rebar repository, you will also require git.
  20. #### Downloading
  21. You can download a pre-built binary version of rebar from:
  22. https://github.com/rebar/rebar/wiki/rebar
  23. #### Building rebar
  24. ```sh
  25. $ git clone git://github.com/rebar/rebar.git
  26. $ cd rebar
  27. $ ./bootstrap
  28. Recompile: src/getopt
  29. ...
  30. Recompile: src/rebar_utils
  31. ==> rebar (compile)
  32. Congratulations! You now have a self-contained script called "rebar" in
  33. your current working directory. Place this script anywhere in your path
  34. and you can use rebar to build OTP-compliant apps.
  35. ```
  36. Contributing to rebar
  37. =====================
  38. Pull requests and branching
  39. ---------------------------
  40. Use one topic branch per pull request.
  41. Do not commit to master in your fork.
  42. Provide a clean branch without any merge commits from upstream.
  43. Usually you should squash any intermediate commits into the original single commit.
  44. Code style
  45. ----------
  46. Do not introduce trailing whitespace.
  47. Do not mix spaces and tabs.
  48. Do not introduce lines longer than 80 characters.
  49. [erlang-mode (emacs)](http://www.erlang.org/doc/man/erlang.el.html) indentation
  50. is preferred. vi-only users are encouraged to give [Vim
  51. emulation](http://emacswiki.org/emacs/Evil) ([more
  52. info](https://gitorious.org/evil/pages/Home)) a try.
  53. Writing Commit Messages
  54. -----------------------
  55. Structure your commit message like this:
  56. <pre>
  57. One line summary (less than 50 characters)
  58. Longer description (wrap at 72 characters)
  59. </pre>
  60. ### Summary
  61. * Less than 50 characters
  62. * What was changed
  63. * Imperative present tense (fix, add, change)
  64. * `Fix bug 123`
  65. * `Add 'foobar' command`
  66. * `Change default timeout to 123`
  67. * No period
  68. ### Description
  69. * Wrap at 72 characters
  70. * Why, explain intention and implementation approach
  71. * Present tense
  72. ### Atomicity
  73. * Break up logical changes
  74. * Make whitespace changes separately
  75. Run checks
  76. ----------
  77. Before you submit a patch, run ``make check`` to execute the test suite and
  78. check for [xref](http://www.erlang.org/doc/man/xref.html) and
  79. [Dialyzer](http://www.erlang.org/doc/man/dialyzer.html) warnings. You may have
  80. to run ``make clean`` first.
  81. [Dialyzer](http://www.erlang.org/doc/man/dialyzer.html) warnings are compared
  82. against a set of safe-to-ignore warnings found in
  83. [dialyzer_reference](https://raw.github.com/rebar/rebar/master/dialyzer_reference).
  84. [xref](http://www.erlang.org/doc/man/xref.html) is run with [custom
  85. queries](https://raw.github.com/rebar/rebar/master/rebar.config) to suppress
  86. safe-to-ignore warnings.
  87. Community and Resources
  88. -----------------------
  89. In case of problems that cannot be solved through documentation or examples, you
  90. may want to try to contact members of the community for help. The community is
  91. also where you want to go for questions about how to extend rebar, fill in bug
  92. reports, and so on.
  93. The main place to go for questions is the [rebar mailing
  94. list](http://lists.basho.com/pipermail/rebar_lists.basho.com/). If you need
  95. quick feedback, you can try the #rebar channel on
  96. [irc.freenode.net](http://freenode.net). Be sure to check the
  97. [wiki](https://github.com/rebar/rebar/wiki) first, just to be sure you're not
  98. asking about things with well known answers.
  99. For bug reports, roadmaps, and issues, visit the [github issues
  100. page](https://github.com/rebar/rebar/issues).
  101. General rebar community resources and links:
  102. - [Rebar Mailing List](http://lists.basho.com/pipermail/rebar_lists.basho.com/)
  103. - #rebar on [irc.freenode.net](http://freenode.net/)
  104. - [wiki](https://github.com/rebar/rebar/wiki)
  105. - [issues](https://github.com/rebar/rebar/issues)