Skip to content

Commit

Permalink
Merge pull request #201070 from Homebrew/go-1.24
Browse files Browse the repository at this point in the history
go 1.24.0, go@1.23 1.23.6 (new formula)
  • Loading branch information
BrewTestBot authored Feb 13, 2025
2 parents 3f64746 + bcef014 commit cd0cd1f
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 20 deletions.
File renamed without changes.
28 changes: 14 additions & 14 deletions Formula/g/go.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Go < Formula
desc "Open source programming language to build simple/reliable/efficient software"
homepage "https://go.dev/"
url "https://go.dev/dl/go1.23.6.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz"
sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222"
url "https://go.dev/dl/go1.24.0.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.24.0.src.tar.gz"
sha256 "d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5"
license "BSD-3-Clause"
head "https://go.googlesource.com/go.git", branch: "master"

Expand All @@ -21,24 +21,24 @@ class Go < Formula
end

bottle do
sha256 arm64_sequoia: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302"
sha256 arm64_sonoma: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302"
sha256 arm64_ventura: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302"
sha256 sonoma: "ad9ea614e83e59837464dbf47816048277b1a645e8e9dc725089cde1c7fcecc8"
sha256 ventura: "ad9ea614e83e59837464dbf47816048277b1a645e8e9dc725089cde1c7fcecc8"
sha256 x86_64_linux: "beffea5cede9e3cc1489383a1ae1c7cb535a20d7195895c71bbfaf67b58fbaaa"
sha256 arm64_sequoia: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434"
sha256 arm64_sonoma: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434"
sha256 arm64_ventura: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434"
sha256 sonoma: "ffc7437814387a60cef12cd31a6b2a14ea16d639f9dc63fccbb488ef9b071be5"
sha256 ventura: "ffc7437814387a60cef12cd31a6b2a14ea16d639f9dc63fccbb488ef9b071be5"
sha256 x86_64_linux: "a0496363bcd151513e4f7a303e83144a6c8353ab5bae79f7a1744c0b25b7d898"
end

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

version "1.20.14"
version "1.22.12"

on_arm do
on_macos do
Expand Down
95 changes: 95 additions & 0 deletions Formula/g/go@1.23.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
class GoAT123 < Formula
desc "Open source programming language to build simple/reliable/efficient software"
homepage "https://go.dev/"
url "https://go.dev/dl/go1.23.6.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz"
sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222"
license "BSD-3-Clause"

livecheck do
url "https://go.dev/dl/?mode=json"
regex(/^go[._-]?v?(1\.23(?:\.\d+)*)[._-]src\.t.+$/i)
strategy :json do |json, regex|
json.map do |release|
next if release["stable"] != true
next if release["files"].none? { |file| file["filename"].match?(regex) }

release["version"][/(\d+(?:\.\d+)+)/, 1]
end
end
end

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b"
sha256 cellar: :any_skip_relocation, arm64_ventura: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b"
sha256 cellar: :any_skip_relocation, sonoma: "4654e00aa7967d9c8cf325253d1f82896f2a6ea40de389879cdfffa235e374af"
sha256 cellar: :any_skip_relocation, ventura: "4654e00aa7967d9c8cf325253d1f82896f2a6ea40de389879cdfffa235e374af"
sha256 cellar: :any_skip_relocation, x86_64_linux: "00ba9579754a0e0a4e6a6840dff51ad36c78cd8e4a3e820631083f09d32cc12b"
end

keg_only :versioned_formula

depends_on "go" => :build

def install
cd "src" do
ENV["GOROOT_FINAL"] = libexec
# Set portable defaults for CC/CXX to be used by cgo
with_env(CC: "cc", CXX: "c++") { system "./make.bash" }
end

libexec.install Dir["*"]
bin.install_symlink Dir[libexec/"bin/go*"]

system bin/"go", "install", "std", "cmd"

# Remove useless files.
# Breaks patchelf because folder contains weird debug/test files
rm_r(libexec/"src/debug/elf/testdata")
# Binaries built for an incompatible architecture
rm_r(libexec/"src/runtime/pprof/testdata")
end

test do
(testpath/"hello.go").write <<~GO
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
GO

# Run go fmt check for no errors then run the program.
# This is a a bare minimum of go working as it uses fmt, build, and run.
system bin/"go", "fmt", "hello.go"
assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go")

with_env(GOOS: "freebsd", GOARCH: "amd64") do
system bin/"go", "build", "hello.go"
end

(testpath/"hello_cgo.go").write <<~GO
package main
/*
#include <stdlib.h>
#include <stdio.h>
void hello() { printf("%s\\n", "Hello from cgo!"); fflush(stdout); }
*/
import "C"
func main() {
C.hello()
}
GO

# Try running a sample using cgo without CC or CXX set to ensure that the
# toolchain's default choice of compilers work
with_env(CC: nil, CXX: nil) do
assert_equal "Hello from cgo!\n", shell_output("#{bin}/go run hello_cgo.go")
end
end
end
13 changes: 7 additions & 6 deletions Formula/g/govulncheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ class Govulncheck < Formula
url "https://github.com/golang/vuln/archive/refs/tags/v1.1.4.tar.gz"
sha256 "da1a7f3224cf874325814dd198eaa42897143fc871226a04944583cb121a15c9"
license "BSD-3-Clause"
revision 1

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
sha256 cellar: :any_skip_relocation, arm64_ventura: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde"
sha256 cellar: :any_skip_relocation, sonoma: "5c0b6b71f712a526b08d5454b56ed3df896e585a98fc564f6380c25501729bb4"
sha256 cellar: :any_skip_relocation, ventura: "5c0b6b71f712a526b08d5454b56ed3df896e585a98fc564f6380c25501729bb4"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6b81782bbd9ea51aa7469409a35d6b9641f52f2ba492bdde3caa760673d1ecbd"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6"
sha256 cellar: :any_skip_relocation, arm64_ventura: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6"
sha256 cellar: :any_skip_relocation, sonoma: "543b6dac71b6b63135bd0ceefb1486ab3fdc7c105963403f933352acc08fb885"
sha256 cellar: :any_skip_relocation, ventura: "543b6dac71b6b63135bd0ceefb1486ab3fdc7c105963403f933352acc08fb885"
sha256 cellar: :any_skip_relocation, x86_64_linux: "d8a7b7d79a6746784346ee9aaf519587f724a363cea87200c4c0b10ad04d316c"
end

depends_on "go" => [:build, :test]
Expand Down

0 comments on commit cd0cd1f

Please sign in to comment.