Skip to content

Commit 21c6561

Browse files
authored
Merge pull request #566 from Mrudul111/feature/homebrew-guide
Issue #547 Add homebrew installation support
2 parents d67ea65 + 5638511 commit 21c6561

File tree

1 file changed

+79
-1
lines changed

1 file changed

+79
-1
lines changed

doc/dev_guide/packaging.md

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,85 @@ TODO Instructions
2222

2323
## Homebrew
2424

25-
TODO Instructions
25+
Homebrew Formula Submission
26+
27+
### 1. Prepare Tap Repository
28+
29+
```
30+
# Create Homebrew tap
31+
gh repo create homebrew-tap --public --clone
32+
mkdir -p homebrew-tap/Formula
33+
cd homebrew-tap
34+
```
35+
36+
### 2. Package apidash
37+
38+
```
39+
# Build macOS bundle
40+
flutter build macos
41+
42+
# Create versioned tarball
43+
tar -czvf apidash-v1.0.0.tar.gz \
44+
-C build/macos/Build/Products/Release/ \
45+
Apidash.app
46+
47+
# Generate SHA256 checksum
48+
shasum -a 256 apidash-v1.0.0.tar.gz
49+
```
50+
51+
### 3. Create Formula File
52+
53+
`Formula/apidash.rb`:
54+
55+
```
56+
class Apidash < Formula
57+
desc "Modern API dashboard for developers"
58+
homepage "https://apidash.dev"
59+
url "https://github.com/<user>/<repo>/releases/download/v1.0.0/apidash-v1.0.0.tar.gz"
60+
sha256 "PASTE_YOUR_SHA256_HERE"
61+
62+
def install
63+
prefix.install "Apidash.app"
64+
bin.write_exec_script prefix/"Apidash.app/Contents/MacOS/Apidash"
65+
end
66+
67+
test do
68+
system "#{bin}/Apidash", "--version"
69+
end
70+
end
71+
```
72+
73+
### 4. Local Validation
74+
75+
```
76+
# Check formula syntax
77+
brew audit --strict Formula/apidash.rb
78+
79+
# Test installation
80+
brew install --build-from-source Formula/apidash.rb
81+
82+
# Verify execution
83+
brew test apidash
84+
```
85+
86+
### 5. Custom Tap Submission
87+
88+
```
89+
# Commit formula to your tap repo
90+
git add Formula/Apidash.rb
91+
git commit -m "added apidash formula"
92+
git push
93+
94+
# Create release for tarball
95+
gh release create v1.0.0 apidash-v1.0.0.tar.gz
96+
```
97+
98+
### 6. Installation
99+
100+
```
101+
brew tap homebrew-tap/Formula
102+
brew install apidash
103+
```
26104

27105
## Chocolatey
28106

0 commit comments

Comments
 (0)