Skip to content

Commit 94fa097

Browse files
Refactor: Update Homebrew formula generation in CI
Co-authored-by: jason <jason@lumos.com>
1 parent c0efb04 commit 94fa097

File tree

5 files changed

+14
-75
lines changed

5 files changed

+14
-75
lines changed

.github/homebrew-templates/lumos.rb.template

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ jobs:
7474
GH_TOKEN: ${{ github.token }}
7575
run: |
7676
gh release upload ${{ github.ref_name }} lumos-${{ matrix.platform }}.tar.gz
77+
<<<<<<< HEAD
78+
=======

IMPLEMENTATION_SUMMARY.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010

1111
### New Files Created:
1212

13-
1. **`.github/homebrew-templates/lumos.rb.template`** (35 lines)
14-
- Multi-platform Homebrew formula template
15-
- Supports macOS (ARM64 + Intel via Rosetta)
16-
- Supports Linux (AMD64 + ARM64)
17-
18-
2. **`scripts/README.md`**
13+
1. **`scripts/README.md`**
1914
- Documentation for homebrew distribution
2015
- Troubleshooting guide
2116

22-
3. **`docs/DX-769-homebrew-improvements.md`**
17+
2. **`docs/DX-769-homebrew-improvements.md`**
2318
- Comprehensive implementation documentation
2419
- Architecture and troubleshooting guide
2520

docs/DX-769-homebrew-improvements.md

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,16 @@ This implementation addresses two key requirements from DX-769:
4747
- Uses GitHub App authentication (same as release workflow)
4848
- Runs as part of the build workflow, ensuring builds complete first
4949

50-
#### 2. Homebrew Formula Template (`.github/homebrew-templates/lumos.rb.template`)
51-
52-
Multi-platform formula supporting:
53-
- **macOS**:
54-
- Apple Silicon (ARM64) - native binary
55-
- Intel - uses ARM binary via Rosetta 2
56-
- **Linux**:
57-
- x86_64 (AMD64)
58-
- ARM64 (aarch64)
59-
60-
The formula uses Homebrew's platform detection:
61-
```ruby
62-
on_macos do
63-
if Hardware::CPU.arm?
64-
# ARM64 binary
65-
else
66-
# Intel Mac uses ARM binary via Rosetta
67-
end
68-
end
69-
70-
on_linux do
71-
if Hardware::CPU.intel?
72-
# x86_64 binary
73-
elsif Hardware::CPU.arm?
74-
# ARM64 binary
75-
end
76-
end
77-
```
50+
#### 2. Homebrew Formula
51+
52+
The formula in the homebrew-tap repository supports multiple platforms:
53+
- **macOS**: Apple Silicon (ARM64) and Intel (via Rosetta 2)
54+
- **Linux**: x86_64 (AMD64) and ARM64 (aarch64)
55+
56+
The workflow updates the formula in-place using `sed` to modify:
57+
- Version number
58+
- Download URLs for each platform
59+
- SHA256 checksums for each platform binary
7860

7961

8062
## Setup Requirements
@@ -208,7 +190,6 @@ Potential improvements for consideration:
208190

209191
- `.github/workflows/build.yml` - Builds binaries and updates homebrew formula
210192
- `.github/workflows/release.yml` - Release creation workflow
211-
- `.github/homebrew-templates/lumos.rb.template` - Formula template
212193
- `scripts/README.md` - Homebrew distribution documentation
213194

214195
## References

scripts/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ The formula supports the following platforms:
2121
- **macOS**: ARM64 (Apple Silicon) and Intel (via Rosetta 2)
2222
- **Linux**: AMD64 (x86_64) and ARM64 (aarch64)
2323

24-
## Formula Template
25-
26-
The formula template is located at [.github/homebrew-templates/lumos.rb.template](../.github/homebrew-templates/lumos.rb.template).
27-
2824
## Required Secrets
2925

3026
The workflow uses the lumos-automations GitHub App (same as the release workflow):

0 commit comments

Comments
 (0)