-
Notifications
You must be signed in to change notification settings - Fork 1
/
gotwc.rb
33 lines (29 loc) · 1.28 KB
/
gotwc.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
class Gotwc < Formula
desc "Tiny world clock in Go!"
homepage "https://github.com/Neved4/gotwc"
url "https://github.com/Neved4/gotwc/archive/refs/tags/v1.1.1.tar.gz"
sha256 "2ada413dc14d2aede39da5dc79030260623ca91e4abbe0f5b648f700736dfec5"
license "MIT"
head "https://github.com/Neved4/gotwc.git", branch: "main"
bottle do
root_url "https://github.com/Neved4/homebrew-tap/releases/download/gotwc-1.1.1"
rebuild 2
sha256 cellar: :any_skip_relocation, arm64_sequoia: "1369333331f55b301163b552cea070a0322c941c00c4a2329483b008a151a259"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "0410b4b17960cd44950dfcc13c59ceacd70423cc504e2aad770c1cd8fd123ac0"
sha256 cellar: :any_skip_relocation, ventura: "466ce4a07bbbb8a9b08fb9293afb393d868832faeb9b139886ff7fd8831e3eab"
sha256 cellar: :any_skip_relocation, x86_64_linux: "8fa37ef210230d2f1b911486b0a2378df6a56b8ec1f9054837c35050893d6430"
end
depends_on "go" => :build
def install
system "go", "build",
*std_go_args(
ldflags: "-w -s",
gcflags: "all=-l -B -wb=false",
)
doc.install "README.md"
end
test do
desired_output = "UTC " + shell_output('date -u +"%Y-%m-%dT%H:%M:%SZ"').strip
assert_equal desired_output, shell_output("#{bin}/gotwc -t UTC").strip
end
end