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.

147 lines
4.0 KiB

преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 14 години
преди 13 години
преди 13 години
преди 14 години
преди 14 години
преди 14 години
  1. rebar
  2. =====
  3. rebar is an Erlang build tool that makes it easy to compile and
  4. test Erlang applications, port drivers and releases.
  5. rebar is a self-contained Erlang script, so it's easy to distribute or even
  6. embed directly in a project. Where possible, rebar uses standard Erlang/OTP
  7. conventions for project structures, thus minimizing the amount of build
  8. configuration work. rebar also provides dependency management, enabling
  9. application writers to easily re-use common libraries from a variety of
  10. locations (git, hg, etc).
  11. Building
  12. --------
  13. Information on building and installing [Erlang/OTP](http://www.erlang.org)
  14. can be found [here](https://github.com/erlang/otp/wiki/Installation)
  15. ([more info](https://github.com/erlang/otp/blob/master/INSTALL.md)).
  16. ### Dependencies
  17. To build rebar you will need a working installation of Erlang R13B03 (or
  18. 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/basho/rebar/wiki/rebar
  23. #### Building rebar
  24. ```sh
  25. $ git clone git://github.com/basho/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 is preferred.
  50. vi-only users are encouraged to give [Vim emulation](http://emacswiki.org/emacs/Evil)
  51. ([more info](https://gitorious.org/evil/pages/Home)) a try.
  52. Writing Commit Messages
  53. -----------------------
  54. Structure your commit message like this:
  55. <pre>
  56. One line summary (less than 50 characters)
  57. Longer description (wrap at 72 characters)
  58. </pre>
  59. ### Summary
  60. * Less than 50 characters
  61. * What was changed
  62. * Imperative present tense (fix, add, change)
  63. * `Fix bug 123`
  64. * `Add 'foobar' command`
  65. * `Change default timeout to 123`
  66. * No period
  67. ### Description
  68. * Wrap at 72 characters
  69. * Why, explain intention and implementation approach
  70. * Present tense
  71. ### Atomicity
  72. * Break up logical changes
  73. * Make whitespace changes separately
  74. Dialyzer and Tidier
  75. -------------------
  76. Before you submit a patch check for
  77. [xref](http://www.erlang.org/doc/man/xref.html) and
  78. [Dialyzer](http://www.erlang.org/doc/man/dialyzer.html)
  79. warnings.
  80. A successful run of ``make check`` looks like:
  81. ```sh
  82. $ make check
  83. Recompile: src/rebar_core
  84. ==> rebar (compile)
  85. Command 'debug' not understood or not applicable
  86. Congratulations! You now have a self-contained script called "rebar" in
  87. your current working directory. Place this script anywhere in your path
  88. and you can use rebar to build OTP-compliant apps.
  89. ==> rebar (xref)
  90. make: [dialyzer_warnings] Error 2 (ignored)
  91. ```
  92. [xref](http://www.erlang.org/doc/man/xref.html) and
  93. [Dialyzer](http://www.erlang.org/doc/man/dialyzer.html) warnings are compared
  94. against a set of safe-to-ignore warnings
  95. found in
  96. [dialyzer_reference](https://raw.github.com/tuncer/rebar/maint/dialyzer_reference)
  97. and
  98. [xref_reference](https://raw.github.com/tuncer/rebar/maint/xref_reference).
  99. It is **strongly recommended** to check the code with
  100. [Tidier](http://tidier.softlab.ntua.gr:20000/tidier/getstarted).
  101. Select all transformation options and enable **automatic**
  102. transformation.
  103. If Tidier suggests a transformation apply the changes **manually**
  104. to the source code.
  105. Do not use the code from the tarball (*out.tgz*) as it will have
  106. white-space changes
  107. applied by Erlang's pretty-printer.