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.

119 lines
3.2 KiB

пре 14 година
пре 14 година
пре 14 година
пре 14 година
пре 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 can be found
  14. in the `INSTALL.md` document.
  15. ### Dependencies
  16. To build rebar you will need a working installation of Erlang R13B03 (or
  17. later).
  18. Should you want to clone the rebar repository, you will also require git.
  19. #### Downloading
  20. Clone the git repository:
  21. $ git clone git://github.com/basho/rebar.git
  22. #### Building rebar
  23. $ cd rebar/
  24. $ ./bootstrap
  25. Recompile: src/getopt
  26. ...
  27. Recompile: src/rebar_utils
  28. ==> rebar (compile)
  29. Congratulations! You now have a self-contained script called "rebar" in
  30. your current working directory. Place this script anywhere in your path
  31. and you can use rebar to build OTP-compliant apps.
  32. Contributing to rebar
  33. =====================
  34. Coding style
  35. ------------
  36. Do not introduce trailing whitespace.
  37. Do not introduce lines longer than 80 characters.
  38. Writing Commit Messages
  39. -----------------------
  40. Structure your commit message like this:
  41. <pre>
  42. One line summary (less than 50 characters)
  43. Longer description (wrap at 72 characters)
  44. </pre>
  45. ### Summary
  46. * Less than 50 characters
  47. * What was changed
  48. * Imperative present tense (fix, add, change)
  49. > Fix bug 123
  50. > Add 'foobar' command
  51. > Change default timeout to 123
  52. * No period
  53. ### Description
  54. * Wrap at 72 characters
  55. * Why, explain intention and implementation approach
  56. * Present tense
  57. ### Atomicity
  58. * Break up logical changes
  59. * Make whitespace changes separately
  60. Dialyzer and Tidier
  61. -------------------
  62. Before you submit a patch check for discrepancies with
  63. [Dialyzer](http://www.erlang.org/doc/man/dialyzer.html):
  64. <pre>
  65. $ cd rebar/
  66. $ ./bootstrap debug
  67. $ dialyzer ebin -Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspecs
  68. </pre>
  69. The following discrepancies are known and safe to ignore:
  70. <pre>
  71. rebar_templater.erl:249: The call rebar_templater:consult(
  72. Cont1::erl_scan:return_cont(),'eof',
  73. Acc::[any()])
  74. contains an opaque term as 1st argument when terms
  75. of different types are expected in these positions
  76. rebar_utils.erl:144: Call to missing or unexported function escript:foldl/3
  77. rebar_utils.erl:165: The created fun has no local return
  78. </pre>
  79. It is **strongly recommended** to check the code with
  80. [Tidier](http://tidier.softlab.ntua.gr:20000/tidier/getstarted).
  81. Select all transformation options and enable **automatic**
  82. transformation.
  83. If Tidier suggests a transformation apply the changes **manually**
  84. to the source code.
  85. Do not use the code from the tarball (*out.tgz*) as it will have
  86. white-space changes
  87. applied by Erlang's pretty-printer.