This introduces a new GoResource category of resource. GoResources
have a specialized stage method which allows a resource to stage
itself into a gopath.
The new Go language module provides a one-liner to stage all
GoResources present in the formula.
This commit introduces a new patch implementation that supports
checksums and caching.
Patches are declared in blocks:
patch do
url ...
sha1 ...
end
A strip level of -p1 is assumed. It can be overridden using a symbol
argument:
patch :p0 do
url ...
sha1 ...
end
Patches can be declared in stable, devel, and head blocks. This form is
preferred over using conditionals.
stable do
# ...
patch do
url ...
sha1 ...
end
end
Embedded (__END__) patches are declared like so:
patch :DATA
patch :p0, :DATA
Patches can also be embedded by passing a string. This makes it possible
to provide multiple embedded patches while making only some of them
conditional.
patch :p0, "..."
Adding a broader exception class allows for errors raised in Resource.fetch
to be caught in upgrade and prevent the process from being killed when
a download fails. This should resolve issue 18364.
FixesHomebrew/homebrew#18364.
ClosesHomebrew/homebrew#26618.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>