Skip to content

Commit 728fb45

Browse files
committed
feat: initial commit
0 parents  commit 728fb45

7 files changed

Lines changed: 493 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update Formula
2+
3+
on:
4+
repository_dispatch:
5+
types: [update-formula]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version to update to (e.g., eeng-5.2.7)'
10+
required: true
11+
type: string
12+
13+
jobs:
14+
update-formula:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.2'
24+
bundler-cache: true
25+
26+
- name: Generate formula
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
VERSION="${{ github.event.client_payload.version || inputs.version }}"
31+
echo "Updating formula to version: $VERSION"
32+
bundle exec ruby generate-formula.rb --version "$VERSION"
33+
34+
- name: Create Pull Request
35+
uses: peter-evans/create-pull-request@v5
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
commit-message: "Update eengine to ${{ github.event.client_payload.version || inputs.version }}"
39+
title: "Update eengine to ${{ github.event.client_payload.version || inputs.version }}"
40+
body: |
41+
Automated update triggered from eengine-releases workflow.
42+
43+
${{ github.event.client_payload.release_url && format('Release: {0}', github.event.client_payload.release_url) || '' }}
44+
45+
This PR updates the Homebrew formula with:
46+
- New version and download URLs
47+
- Updated SHA256 checksums for all platforms
48+
branch: "update-${{ github.event.client_payload.version || inputs.version }}"
49+
delete-branch: true
50+
labels: |
51+
automated
52+
formula-update

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Ruby
2+
Gemfile.lock
3+
.bundle/
4+
vendor/
5+
6+
# Generated formula (will be regenerated)
7+
Formula/
8+
9+
# macOS
10+
.DS_Store
11+
12+
# Editor
13+
.vscode/
14+
.idea/
15+
*.swp
16+
*.swo
17+
*~

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'octokit', '~> 6.0'

README.adoc

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
= Homebrew Tap for Express Engine (eengine)
2+
:toc:
3+
:toclevels: 2
4+
5+
== Purpose
6+
7+
This repository provides a Homebrew tap for installing
8+
https://github.com/expresslang/eengine-releases[Express Engine (eengine)]
9+
on macOS and Linux systems.
10+
11+
Express Engine is an open-source EXPRESS language parser and interpreter
12+
implemented in Steel Bank Common Lisp (SBCL).
13+
14+
== Installation
15+
16+
=== Add the tap
17+
18+
[source,bash]
19+
----
20+
brew tap expresslang/eengine
21+
----
22+
23+
=== Install eengine
24+
25+
[source,bash]
26+
----
27+
brew install eengine
28+
----
29+
30+
=== Verify installation
31+
32+
[source,bash]
33+
----
34+
eengine --version
35+
----
36+
37+
=== Update to latest version
38+
39+
[source,bash]
40+
----
41+
brew upgrade eengine
42+
----
43+
44+
== Supported Platforms
45+
46+
The formula supports the following platforms:
47+
48+
* macOS (Apple Silicon)
49+
* macOS (Intel)
50+
* Linux (x86-64)
51+
* Linux (ARM64)
52+
53+
The formula automatically detects your platform and installs the appropriate
54+
binary.
55+
56+
== How It Works
57+
58+
=== Automated Updates
59+
60+
This tap is automatically updated when new eengine releases are published:
61+
62+
1. A new release is created in
63+
https://github.com/expresslang/eengine-releases[eengine-releases]
64+
2. The release workflow triggers a `repository_dispatch` event to this
65+
repository
66+
3. The `update-formula.yml` workflow runs `generate-formula.rb` to:
67+
* Download all platform binaries from the release
68+
* Calculate SHA256 checksums
69+
* Update `formula-metadata.json`
70+
* Generate `Formula/eengine.rb` from the ERB template
71+
4. A pull request is created with the updated formula
72+
5. After review and merge, the new version is available via Homebrew
73+
74+
=== Manual Formula Generation
75+
76+
To manually update the formula (for testing or maintenance):
77+
78+
[source,bash]
79+
----
80+
# Install dependencies
81+
bundle install
82+
83+
# Generate formula for a specific version
84+
bundle exec ruby generate-formula.rb --version eeng-5.2.7
85+
86+
# Dry run (preview changes without writing files)
87+
bundle exec ruby generate-formula.rb --version eeng-5.2.7 --dry-run
88+
----
89+
90+
== Repository Structure
91+
92+
[source]
93+
----
94+
homebrew-eengine/
95+
├── .github/workflows/
96+
│ └── update-formula.yml # Automated formula update workflow
97+
├── Formula/
98+
│ └── eengine.rb # Generated Homebrew formula
99+
├── templates/
100+
│ └── eengine.rb.erb # ERB template for formula
101+
├── formula-metadata.json # Version and SHA256 metadata
102+
├── generate-formula.rb # Formula generator script
103+
├── Gemfile # Ruby dependencies
104+
└── README.adoc # This file
105+
----
106+
107+
== Development
108+
109+
=== Prerequisites
110+
111+
* Ruby 3.2 or later
112+
* Bundler
113+
114+
=== Setup
115+
116+
[source,bash]
117+
----
118+
# Install dependencies
119+
bundle install
120+
121+
# Set GitHub token for testing (optional)
122+
export GITHUB_TOKEN=your_token_here
123+
----
124+
125+
=== Testing
126+
127+
Test the formula locally before publishing:
128+
129+
[source,bash]
130+
----
131+
# Install from local tap
132+
brew install --build-from-source Formula/eengine.rb
133+
134+
# Test the installation
135+
eengine --version
136+
137+
# Uninstall
138+
brew uninstall eengine
139+
----
140+
141+
== Contributing
142+
143+
This repository is primarily maintained through automated workflows. Manual
144+
updates should only be necessary for:
145+
146+
* Updating the formula template (`templates/eengine.rb.erb`)
147+
* Modifying the generator script (`generate-formula.rb`)
148+
* Fixing workflow issues
149+
150+
== License
151+
152+
This tap is provided as-is for distributing eengine via Homebrew. Refer to the
153+
https://github.com/expresslang/eengine-releases[eengine-releases repository]
154+
for license information about eengine itself.

formula-metadata.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "0.0.0",
3+
"expresslang/eengine-releases": {
4+
"mac-arm64": {
5+
"url": "https://github.com/expresslang/eengine-releases/releases/download/eeng-0.0.0/eengine-0.0.0-mac-arm64-sbcl",
6+
"sha256": "0000000000000000000000000000000000000000000000000000000000000000"
7+
},
8+
"mac-x86-64": {
9+
"url": "https://github.com/expresslang/eengine-releases/releases/download/eeng-0.0.0/eengine-0.0.0-mac-x86-64-sbcl",
10+
"sha256": "0000000000000000000000000000000000000000000000000000000000000000"
11+
},
12+
"lnx-x86-64": {
13+
"url": "https://github.com/expresslang/eengine-releases/releases/download/eeng-0.0.0/eengine-0.0.0-lnx-x86-64-sbcl",
14+
"sha256": "0000000000000000000000000000000000000000000000000000000000000000"
15+
},
16+
"lnx-arm64": {
17+
"url": "https://github.com/expresslang/eengine-releases/releases/download/eeng-0.0.0/eengine-0.0.0-lnx-arm64-sbcl",
18+
"sha256": "0000000000000000000000000000000000000000000000000000000000000000"
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)