Baptiste Fontaine bb37aa2824 go: warn about no-op stage_deps calls
Closes Homebrew/homebrew#49389.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-21 21:21:23 +01:00

15 lines
450 B
Ruby

require "resource"
module Language
module Go
# Given a set of resources, stages them to a gopath for
# building go software.
# The resource names should be the import name of the package,
# e.g. `resource "github.com/foo/bar"`
def self.stage_deps(resources, target)
opoo "tried to stage empty resources array" if resources.empty?
resources.grep(Resource::Go) { |resource| resource.stage(target) }
end
end
end