Skip to content

Commit a7bf743

Browse files
authored
Merge pull request Homebrew#201398 from Homebrew/go-blueprint
go-blueprint 0.10.3 (new formula)
2 parents 41c51d2 + 702e352 commit a7bf743

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/autobump.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,7 @@ [email protected]
11521152
gnuplot
11531153
gnutls
11541154
go
1155+
go-blueprint
11551156
go-camo
11561157
go-critic
11571158
go-feature-flag-relay-proxy

Formula/g/go-blueprint.rb

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
class GoBlueprint < Formula
2+
desc "CLI to streamline Go project setup with standardized structure"
3+
homepage "https://docs.go-blueprint.dev/"
4+
url "https://github.com/Melkeydev/go-blueprint/archive/refs/tags/v0.10.3.tar.gz"
5+
sha256 "2bdceb5946f4b08cdd98e29e50404a48fc47967cb3ef0f0e66f8b5ec3b7e07e0"
6+
license "MIT"
7+
head "https://github.com/Melkeydev/go-blueprint.git", branch: "main"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "1495c597dd43eba4ed804b3b1f7439935d57c9743a8c3c515e1d8632869fd265"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "1495c597dd43eba4ed804b3b1f7439935d57c9743a8c3c515e1d8632869fd265"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "1495c597dd43eba4ed804b3b1f7439935d57c9743a8c3c515e1d8632869fd265"
13+
sha256 cellar: :any_skip_relocation, sonoma: "a1ba633129a69bbdcfbfab47f7ce4f227864ecd9d3fba0d6c500f91fccc256a2"
14+
sha256 cellar: :any_skip_relocation, ventura: "a1ba633129a69bbdcfbfab47f7ce4f227864ecd9d3fba0d6c500f91fccc256a2"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "2ddec9f865e204aec679d7e5ed1e8147f8c370b775ffdbb70676c1d2ee8951a8"
16+
end
17+
18+
depends_on "go"
19+
20+
def install
21+
system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/melkeydev/go-blueprint/cmd.GoBlueprintVersion=#{version}")
22+
23+
generate_completions_from_executable(bin/"go-blueprint", "completion")
24+
end
25+
26+
test do
27+
assert_match version.to_s, shell_output("#{bin}/go-blueprint version")
28+
29+
# Fails in Linux CI with `/dev/tty: no such device or address`
30+
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]
31+
32+
module_name = "brew.sh/test"
33+
system bin/"go-blueprint", "create", "--name", module_name,
34+
"--framework", "gin", "--driver", "sqlite", "--git", "skip"
35+
36+
test_project = testpath/"test"
37+
assert_path_exists test_project/"cmd/api/main.go"
38+
assert_match "module #{module_name}", (test_project/"go.mod").read
39+
end
40+
end

0 commit comments

Comments
 (0)