diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index e9fbae0978..434ed78800 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -481,20 +481,7 @@ If anything isn’t clear, you can usually figure it out by `grep`ping the `$(br ### Unstable versions (`devel`, `head`) -Formulae can specify alternate downloads for the upstream project’s [`devel`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#devel-class_method) release (unstable but not `master`/`trunk`) or [`head`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#head-class_method) (`master`/`trunk`). - -#### `devel` - -The [`devel`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#devel-class_method) spec (activated by passing `--devel`) is used for a project’s unstable releases. It is specified in a block: - -```ruby -devel do - url "https://foo.com/foo-0.1.tar.gz" - sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7" -end -``` - -You can test if the [`devel`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#devel-class_method) spec is in use with `build.devel?`. +Formulae can specify alternate downloads for the upstream project’s [`head`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#head-class_method) (`master`/`trunk`) or [`devel`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#devel-class_method) release (unstable but not `master`/`trunk`). #### `head` @@ -519,6 +506,21 @@ class Foo < Formula end ``` +#### `devel` + +The [`devel`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#devel-class_method) spec (activated by passing `--devel`) is used for a project’s unstable releases. `devel` specs are not allowed in Homebrew/homebrew-core. + +A `devel` spec is specified in a block: + +```ruby +devel do + url "https://foo.com/foo-0.1.tar.gz" + sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7" +end +``` + +You can test if the [`devel`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#devel-class_method) spec is in use with `build.devel?`. + ### Compiler selection Sometimes a package fails to build when using a certain compiler. Since recent [Xcode versions](Xcode.md) no longer include a GCC compiler we cannot simply force the use of GCC. Instead, the correct way to declare this is the [`fails_with`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method) DSL method. A properly constructed [`fails_with`](https://www.rubydoc.info/github/Homebrew/brew/master/Formula#fails_with-class_method) block documents the latest compiler build version known to cause compilation to fail, and the cause of the failure. For example: