|
1 | 1 | class Shfmt < Formula |
2 | 2 | desc "Autoformat shell script source code" |
3 | 3 | homepage "https://github.com/mvdan/sh" |
4 | | - url "https://github.com/mvdan/sh/archive/refs/tags/v3.12.0.tar.gz" |
5 | | - sha256 "ac15f42feeba55af29bd07698a881deebed1cd07e937effe140d9300e79d5ceb" |
| 4 | + url "https://github.com/mvdan/sh/archive/refs/tags/v3.13.0.tar.gz" |
| 5 | + sha256 "efef583999befd358fae57858affa4eb9dc8a415f39f69d0ebab3a9f473d7dd3" |
6 | 6 | license "BSD-3-Clause" |
7 | 7 | head "https://github.com/mvdan/sh.git", branch: "master" |
8 | 8 |
|
9 | 9 | bottle do |
10 | | - sha256 cellar: :any_skip_relocation, arm64_tahoe: "3f1b1d608e46c6a7ac98efd1bf44b821393f479809ee357f04762b34ee2614b2" |
11 | | - sha256 cellar: :any_skip_relocation, arm64_sequoia: "6a4cdf35bd37ddeac3608da2adfc45c2d1b276b9419154d925cfe63b8973035c" |
12 | | - sha256 cellar: :any_skip_relocation, arm64_sonoma: "6a4cdf35bd37ddeac3608da2adfc45c2d1b276b9419154d925cfe63b8973035c" |
13 | | - sha256 cellar: :any_skip_relocation, arm64_ventura: "6a4cdf35bd37ddeac3608da2adfc45c2d1b276b9419154d925cfe63b8973035c" |
14 | | - sha256 cellar: :any_skip_relocation, sonoma: "2a7f654ebd0ad605b8f47f4d182e1106050ad6f34cb1b68967d979c54e72e86c" |
15 | | - sha256 cellar: :any_skip_relocation, ventura: "2a7f654ebd0ad605b8f47f4d182e1106050ad6f34cb1b68967d979c54e72e86c" |
16 | | - sha256 cellar: :any_skip_relocation, arm64_linux: "a322ef4b30bc6f54f645988c0cb5b4a02887bff693af18f75dbf42bb022adb8c" |
17 | | - sha256 cellar: :any_skip_relocation, x86_64_linux: "38a4a4aef3735b47289c4d985c8f922b1b96ef9e36232a90d4aa88c80eeb997c" |
| 10 | + sha256 cellar: :any_skip_relocation, arm64_tahoe: "daba25b6eaa9fad3fafd0cc18cdb1cff105c8a2f668425246d2d8ccfb27f0bea" |
| 11 | + sha256 cellar: :any_skip_relocation, arm64_sequoia: "daba25b6eaa9fad3fafd0cc18cdb1cff105c8a2f668425246d2d8ccfb27f0bea" |
| 12 | + sha256 cellar: :any_skip_relocation, arm64_sonoma: "daba25b6eaa9fad3fafd0cc18cdb1cff105c8a2f668425246d2d8ccfb27f0bea" |
| 13 | + sha256 cellar: :any_skip_relocation, sonoma: "078f86b43cc4ebfe44586c7897954d9a17b2f4339742e3044a65ab53c23232ab" |
| 14 | + sha256 cellar: :any_skip_relocation, arm64_linux: "a0e8f15dca5f36dd316e1866fbb7d034216cbb8b5dd5d96c23d2034c07c92b49" |
| 15 | + sha256 cellar: :any_skip_relocation, x86_64_linux: "053eb1c7ea71daaa7b28649797289f69a59d4d39e3d30c19c81b46944bbe0da9" |
18 | 16 | end |
19 | 17 |
|
20 | 18 | depends_on "go" => :build |
21 | 19 | depends_on "scdoc" => :build |
22 | 20 |
|
23 | 21 | def install |
24 | 22 | ENV["CGO_ENABLED"] = "0" |
25 | | - ldflags = %W[ |
26 | | - -s -w |
27 | | - -extldflags=-static |
28 | | - -X main.version=#{version} |
29 | | - ] |
| 23 | + ldflags = "-s -w -extldflags=-static" |
| 24 | + inreplace "cmd/shfmt/main.go", "version = mod.Version", "version = \"#{version}\"" |
30 | 25 | system "go", "build", *std_go_args(ldflags:), "./cmd/shfmt" |
31 | 26 | man1.mkpath |
32 | 27 | system "scdoc < ./cmd/shfmt/shfmt.1.scd > #{man1}/shfmt.1" |
|
0 commit comments