Skip to content

Commit d7a826b

Browse files
authored
Merge pull request Homebrew#254948 from Homebrew/tile38-postinstall
tile38: move post-installed var subdirs to bottle
2 parents b50a445 + d2864b8 commit d7a826b

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

Formula/t/tile38.rb

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,17 @@ class Tile38 < Formula
88
head "https://github.com/tidwall/tile38.git", branch: "master"
99

1010
bottle do
11-
sha256 cellar: :any_skip_relocation, arm64_tahoe: "6c9990718f67497f27822a55596c07bf0c4ee56309e32716133d15b6f8278d25"
12-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "ee88a236bf68b49cdfb2543dc88eb95fae293be156b07de8060dbebe107053b7"
13-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "03f270ec38f4b69a51bf8b77db658937c01b805c289589b6dc7e23ed68c2e609"
14-
sha256 cellar: :any_skip_relocation, sonoma: "1f0498da1366d75037f12a3f4e2405c496d062930f0b57ef4b2afb230d1f0ddf"
15-
sha256 cellar: :any_skip_relocation, arm64_linux: "c166d5307e57710adfbb4ee57c42eac71e5f6771b60b02b154ff7fdc563a8568"
16-
sha256 cellar: :any_skip_relocation, x86_64_linux: "c89546c235af2ab22636fd440fde5344e121d36f458ece74a0589601006c8dc0"
11+
rebuild 1
12+
sha256 cellar: :any_skip_relocation, arm64_tahoe: "38d712a280230b6b1538b048ac3ef9e5c864d494a7d60f199f05709b402352d7"
13+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "0eded5b6ac9b6aa2526075c77c7734b3cd6bf5045db47ef6a2d50e1b7d8d2c1c"
14+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "38a35ae950df7ae0b72324f02e1ce2409e4f972af0ce6aa358f4741c76c0e814"
15+
sha256 cellar: :any_skip_relocation, sonoma: "e652ede6b01113108a682c4c67fc55ee2363bd57c589423de1e924e040f0ea95"
16+
sha256 cellar: :any_skip_relocation, arm64_linux: "96c0bc67fcec2a39503dbc67ae7f9822caf2959a0aaeccf7641a5e5e30776150"
17+
sha256 cellar: :any_skip_relocation, x86_64_linux: "7cfcf855c247c549a077c6ca7187078618e739c8c0404c81a996cf19e0e428d0"
1718
end
1819

1920
depends_on "go" => :build
2021

21-
def datadir
22-
var/"tile38/data"
23-
end
24-
2522
def install
2623
ldflags = %W[
2724
-s -w
@@ -31,17 +28,9 @@ def install
3128

3229
system "go", "build", *std_go_args(ldflags:, output: bin/"tile38-server"), "./cmd/tile38-server"
3330
system "go", "build", *std_go_args(ldflags:, output: bin/"tile38-cli"), "./cmd/tile38-cli"
34-
end
3531

36-
def post_install
3732
# Make sure the data directory exists
38-
datadir.mkpath
39-
end
40-
41-
def caveats
42-
<<~EOS
43-
To connect: tile38-cli
44-
EOS
33+
(var/"tile38/data").mkpath
4534
end
4635

4736
service do
@@ -54,9 +43,7 @@ def caveats
5443

5544
test do
5645
port = free_port
57-
pid = fork do
58-
exec bin/"tile38-server", "-q", "-p", port.to_s
59-
end
46+
pid = spawn bin/"tile38-server", "-q", "-p", port.to_s
6047
sleep 2
6148
# remove `$408` in the first line output
6249
json_output = shell_output("#{bin}/tile38-cli -p #{port} server")

0 commit comments

Comments
 (0)