Skip to content

Commit cd0cd1f

Browse files
authored
Merge pull request #201070 from Homebrew/go-1.24
go 1.24.0, [email protected] 1.23.6 (new formula)
2 parents 3f64746 + bcef014 commit cd0cd1f

File tree

4 files changed

+116
-20
lines changed

4 files changed

+116
-20
lines changed
File renamed without changes.

Formula/g/go.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
class Go < Formula
22
desc "Open source programming language to build simple/reliable/efficient software"
33
homepage "https://go.dev/"
4-
url "https://go.dev/dl/go1.23.6.src.tar.gz"
5-
mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz"
6-
sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222"
4+
url "https://go.dev/dl/go1.24.0.src.tar.gz"
5+
mirror "https://fossies.org/linux/misc/go1.24.0.src.tar.gz"
6+
sha256 "d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5"
77
license "BSD-3-Clause"
88
head "https://go.googlesource.com/go.git", branch: "master"
99

@@ -21,24 +21,24 @@ class Go < Formula
2121
end
2222

2323
bottle do
24-
sha256 arm64_sequoia: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302"
25-
sha256 arm64_sonoma: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302"
26-
sha256 arm64_ventura: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302"
27-
sha256 sonoma: "ad9ea614e83e59837464dbf47816048277b1a645e8e9dc725089cde1c7fcecc8"
28-
sha256 ventura: "ad9ea614e83e59837464dbf47816048277b1a645e8e9dc725089cde1c7fcecc8"
29-
sha256 x86_64_linux: "beffea5cede9e3cc1489383a1ae1c7cb535a20d7195895c71bbfaf67b58fbaaa"
24+
sha256 arm64_sequoia: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434"
25+
sha256 arm64_sonoma: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434"
26+
sha256 arm64_ventura: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434"
27+
sha256 sonoma: "ffc7437814387a60cef12cd31a6b2a14ea16d639f9dc63fccbb488ef9b071be5"
28+
sha256 ventura: "ffc7437814387a60cef12cd31a6b2a14ea16d639f9dc63fccbb488ef9b071be5"
29+
sha256 x86_64_linux: "a0496363bcd151513e4f7a303e83144a6c8353ab5bae79f7a1744c0b25b7d898"
3030
end
3131

3232
# Don't update this unless this version cannot bootstrap the new version.
3333
resource "gobootstrap" do
3434
checksums = {
35-
"darwin-arm64" => "6da3f76164b215053daf730a9b8f1d673dbbaa4c61031374a6744b75cb728641",
36-
"darwin-amd64" => "754363489e2244e72cb49b4ec6ddfd6a2c60b0700f8c4876e11befb1913b11c5",
37-
"linux-arm64" => "2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b",
38-
"linux-amd64" => "ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44",
35+
"darwin-arm64" => "416c35218edb9d20990b5d8fc87be655d8b39926f15524ea35c66ee70273050d",
36+
"darwin-amd64" => "e7bbe07e96f0bd3df04225090fe1e7852ed33af37c43a23e16edbbb3b90a5b7c",
37+
"linux-arm64" => "fd017e647ec28525e86ae8203236e0653242722a7436929b1f775744e26278e7",
38+
"linux-amd64" => "4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43",
3939
}
4040

41-
version "1.20.14"
41+
version "1.22.12"
4242

4343
on_arm do
4444
on_macos do

Formula/g/[email protected]

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
class GoAT123 < Formula
2+
desc "Open source programming language to build simple/reliable/efficient software"
3+
homepage "https://go.dev/"
4+
url "https://go.dev/dl/go1.23.6.src.tar.gz"
5+
mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz"
6+
sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222"
7+
license "BSD-3-Clause"
8+
9+
livecheck do
10+
url "https://go.dev/dl/?mode=json"
11+
regex(/^go[._-]?v?(1\.23(?:\.\d+)*)[._-]src\.t.+$/i)
12+
strategy :json do |json, regex|
13+
json.map do |release|
14+
next if release["stable"] != true
15+
next if release["files"].none? { |file| file["filename"].match?(regex) }
16+
17+
release["version"][/(\d+(?:\.\d+)+)/, 1]
18+
end
19+
end
20+
end
21+
22+
bottle do
23+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b"
24+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b"
25+
sha256 cellar: :any_skip_relocation, arm64_ventura: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b"
26+
sha256 cellar: :any_skip_relocation, sonoma: "4654e00aa7967d9c8cf325253d1f82896f2a6ea40de389879cdfffa235e374af"
27+
sha256 cellar: :any_skip_relocation, ventura: "4654e00aa7967d9c8cf325253d1f82896f2a6ea40de389879cdfffa235e374af"
28+
sha256 cellar: :any_skip_relocation, x86_64_linux: "00ba9579754a0e0a4e6a6840dff51ad36c78cd8e4a3e820631083f09d32cc12b"
29+
end
30+
31+
keg_only :versioned_formula
32+
33+
depends_on "go" => :build
34+
35+
def install
36+
cd "src" do
37+
ENV["GOROOT_FINAL"] = libexec
38+
# Set portable defaults for CC/CXX to be used by cgo
39+
with_env(CC: "cc", CXX: "c++") { system "./make.bash" }
40+
end
41+
42+
libexec.install Dir["*"]
43+
bin.install_symlink Dir[libexec/"bin/go*"]
44+
45+
system bin/"go", "install", "std", "cmd"
46+
47+
# Remove useless files.
48+
# Breaks patchelf because folder contains weird debug/test files
49+
rm_r(libexec/"src/debug/elf/testdata")
50+
# Binaries built for an incompatible architecture
51+
rm_r(libexec/"src/runtime/pprof/testdata")
52+
end
53+
54+
test do
55+
(testpath/"hello.go").write <<~GO
56+
package main
57+
58+
import "fmt"
59+
60+
func main() {
61+
fmt.Println("Hello World")
62+
}
63+
GO
64+
65+
# Run go fmt check for no errors then run the program.
66+
# This is a a bare minimum of go working as it uses fmt, build, and run.
67+
system bin/"go", "fmt", "hello.go"
68+
assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go")
69+
70+
with_env(GOOS: "freebsd", GOARCH: "amd64") do
71+
system bin/"go", "build", "hello.go"
72+
end
73+
74+
(testpath/"hello_cgo.go").write <<~GO
75+
package main
76+
77+
/*
78+
#include <stdlib.h>
79+
#include <stdio.h>
80+
void hello() { printf("%s\\n", "Hello from cgo!"); fflush(stdout); }
81+
*/
82+
import "C"
83+
84+
func main() {
85+
C.hello()
86+
}
87+
GO
88+
89+
# Try running a sample using cgo without CC or CXX set to ensure that the
90+
# toolchain's default choice of compilers work
91+
with_env(CC: nil, CXX: nil) do
92+
assert_equal "Hello from cgo!\n", shell_output("#{bin}/go run hello_cgo.go")
93+
end
94+
end
95+
end

Formula/g/govulncheck.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ class Govulncheck < Formula
44
url "https://github.com/golang/vuln/archive/refs/tags/v1.1.4.tar.gz"
55
sha256 "da1a7f3224cf874325814dd198eaa42897143fc871226a04944583cb121a15c9"
66
license "BSD-3-Clause"
7+
revision 1
78

89
bottle do
9-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
10-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
11-
sha256 cellar: :any_skip_relocation, arm64_ventura: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
12-
sha256 cellar: :any_skip_relocation, sonoma: "5c0b6b71f712a526b08d5454b56ed3df896e585a98fc564f6380c25501729bb4"
13-
sha256 cellar: :any_skip_relocation, ventura: "5c0b6b71f712a526b08d5454b56ed3df896e585a98fc564f6380c25501729bb4"
14-
sha256 cellar: :any_skip_relocation, x86_64_linux: "6b81782bbd9ea51aa7469409a35d6b9641f52f2ba492bdde3caa760673d1ecbd"
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6"
13+
sha256 cellar: :any_skip_relocation, sonoma: "543b6dac71b6b63135bd0ceefb1486ab3fdc7c105963403f933352acc08fb885"
14+
sha256 cellar: :any_skip_relocation, ventura: "543b6dac71b6b63135bd0ceefb1486ab3fdc7c105963403f933352acc08fb885"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "d8a7b7d79a6746784346ee9aaf519587f724a363cea87200c4c0b10ad04d316c"
1516
end
1617

1718
depends_on "go" => [:build, :test]

0 commit comments

Comments
 (0)