-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
/
Copy pathgpm.rb
36 lines (31 loc) · 1.1 KB
/
gpm.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class Gpm < Formula
desc "Barebones dependency manager for Go"
homepage "https://github.com/pote/gpm"
url "https://github.com/pote/gpm/archive/refs/tags/v1.4.0.tar.gz"
sha256 "2e213abbb1a12ecb895c3f02b74077d3440b7ae3221b4b524659c2ea9065b02a"
license "MIT"
revision 1
bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, all: "02b1f03f80d4477e80aaa5b1cc62e9a4be9288f4d4116a23c386bb9b6fcd3906"
end
# https://tip.golang.org/doc/go1.22
disable! date: "2024-08-03", because: "runs `go get` outside of a module, which is no longer supported"
depends_on "go"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
ENV["GOPATH"] = testpath
ENV["GO111MODULE"] = "auto"
(testpath/"Godeps").write("github.com/pote/gpm-testing-package v6.1")
system bin/"gpm", "install"
(testpath/"go_code.go").write <<~GO
package main
import ("fmt"; "github.com/pote/gpm-testing-package")
func main() { fmt.Print(gpm_testing_package.Version()) }
GO
assert_equal "v6.1", shell_output("go run go_code.go")
end
end