Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 56 additions & 20 deletions .github/workflows/publish-installers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: Publish Installers

# This workflow publishes pre-built macOS installer packages to stuffbucket/installers.
#
# Package Versioning:
# - Packages use major version in filename (e.g., stuffbucket-lima-2.pkg)
# - Packages are wrappers that run `brew install` to get latest version from formulas
# - Packages must be built manually on macOS and committed to this repo
# - Run `pkgs/build-all.sh` on macOS when package installer logic changes
# - No need to rebuild for minor/patch formula version updates

on:
push:
branches: [ main ]
Expand Down Expand Up @@ -28,19 +37,40 @@ jobs:
run: |
brew tap stuffbucket/tap $(pwd)
LIMA_VER=$(brew info --json=v2 stuffbucket/tap/lima | jq -r '.formulae[0].versions.stable')
VSCODE_VER=$(brew info --json=v2 stuffbucket/tap/vscode-lima | jq -r '.formulae[0].versions.stable')
echo "lima_version=${LIMA_VER}" >> $GITHUB_OUTPUT
echo "vscode_version=${VSCODE_VER}" >> $GITHUB_OUTPUT
echo "homebrew_version=1.0.0" >> $GITHUB_OUTPUT

- name: Verify packages exist
working-directory: homebrew-tap
run: |
echo "Verifying pre-built packages..."
ls -lh pkgs/homebrew/stuffbucket-homebrew-*.pkg
ls -lh pkgs/lima/stuffbucket-lima-*.pkg
ls -lh pkgs/vscode-lima/stuffbucket-vscode-lima-*.pkg
MISSING=0

if [ ! -f pkgs/homebrew/stuffbucket-homebrew-1.pkg ]; then
echo "❌ Missing: pkgs/homebrew/stuffbucket-homebrew-1.pkg"
MISSING=1
else
ls -lh pkgs/homebrew/stuffbucket-homebrew-1.pkg
fi

if [ ! -f pkgs/lima/stuffbucket-lima-2.pkg ]; then
echo "❌ Missing: pkgs/lima/stuffbucket-lima-2.pkg"
MISSING=1
else
ls -lh pkgs/lima/stuffbucket-lima-2.pkg
fi

if [ $MISSING -eq 1 ]; then
echo ""
echo "⚠️ Packages must be built on macOS and committed to the repository."
echo "Run 'pkgs/build-all.sh' on macOS, then commit the generated .pkg files."
echo "See pkgs/README.md for details."
exit 1
fi

echo "✅ All packages found"
echo ""
echo "Note: VS Code extension distributed via marketplace (stuffbucket-co.lima-manager)"

- name: Checkout installers repo
uses: actions/checkout@v4
Expand All @@ -53,9 +83,8 @@ jobs:
- name: Copy packages to installers repo
run: |
mkdir -p installers/macos
cp homebrew-tap/pkgs/homebrew/stuffbucket-homebrew-*.pkg installers/macos/
cp homebrew-tap/pkgs/lima/stuffbucket-lima-*.pkg installers/macos/
cp homebrew-tap/pkgs/vscode-lima/stuffbucket-vscode-lima-*.pkg installers/macos/
cp homebrew-tap/pkgs/homebrew/stuffbucket-homebrew-1.pkg installers/macos/
cp homebrew-tap/pkgs/lima/stuffbucket-lima-2.pkg installers/macos/

# Generate checksums
cd installers/macos
Expand All @@ -66,7 +95,7 @@ jobs:
{
"homebrew": "${{ steps.versions.outputs.homebrew_version }}",
"lima": "${{ steps.versions.outputs.lima_version }}",
"vscode-lima": "${{ steps.versions.outputs.vscode_version }}",
"vscode-lima": "See VS Code Marketplace: stuffbucket-co.lima-manager",
"updated": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"commit": "${{ github.sha }}"
}
Expand Down Expand Up @@ -100,8 +129,8 @@ jobs:
git commit -m "Update macOS installers

- Lima: ${{ steps.versions.outputs.lima_version }}
- VS Code Lima: ${{ steps.versions.outputs.vscode_version }}
- Homebrew: ${{ steps.versions.outputs.homebrew_version }}
- VS Code Lima: Available on marketplace (stuffbucket-co.lima-manager)

Source: stuffbucket/homebrew-tap@${{ github.sha }}"
git push origin main
Expand All @@ -121,23 +150,30 @@ jobs:
name: Lima ${{ steps.versions.outputs.lima_version }}
body: |
# macOS Installer Packages

## What's Included
- **stuffbucket-homebrew-1.0.0.pkg** - Homebrew tap setup
- **stuffbucket-lima-${{ steps.versions.outputs.lima_version }}.pkg** - Lima virtual machines
- **stuffbucket-vscode-lima-${{ steps.versions.outputs.vscode_version }}.pkg** - VS Code extension

- **stuffbucket-homebrew-1.pkg** - Homebrew tap setup (v1.0.0)
- **stuffbucket-lima-2.pkg** - Lima virtual machines (installs v${{ steps.versions.outputs.lima_version }})

## VS Code Extension
Install separately from the VS Code Marketplace:
```bash
code --install-extension stuffbucket-co.lima-manager
```

Or search "Lima Manager" in VS Code Extensions (Cmd+Shift+X)

## Installation

Install in order:
1. Homebrew package (sets up tap)
2. Lima package
3. VS Code Lima package (optional)
3. VS Code extension (optional, see above)

## Checksums

See `SHA256SUMS` file for package verification.

---
Built from: stuffbucket/homebrew-tap@${{ github.sha }}
files: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Get package files
id: packages
run: |
# Find all .pkg files
HOMEBREW_PKG=$(find pkgs/homebrew -name "*.pkg" -not -path "*/build/*" | head -1)
LIMA_PKG=$(find pkgs/lima -name "*.pkg" -not -path "*/build/*" | head -1)
VSCODE_PKG=$(find pkgs/vscode-lima -name "*.pkg" -not -path "*/build/*" | head -1)
# Find all .pkg files (using major version naming)
HOMEBREW_PKG=$(find pkgs/homebrew -name "stuffbucket-homebrew-*.pkg" -not -path "*/build/*" | head -1)
LIMA_PKG=$(find pkgs/lima -name "stuffbucket-lima-*.pkg" -not -path "*/build/*" | head -1)
VSCODE_PKG=$(find pkgs/vscode-lima -name "stuffbucket-vscode-lima-*.pkg" -not -path "*/build/*" | head -1)

echo "homebrew_pkg=${HOMEBREW_PKG}" >> $GITHUB_OUTPUT
echo "lima_pkg=${LIMA_PKG}" >> $GITHUB_OUTPUT
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Tap repository
run: |
# Remove tap if it already exists to avoid remote mismatch
brew untap stuffbucket/tap 2>/dev/null || true
# Tap from local checkout
brew tap stuffbucket/tap $(pwd)

Expand All @@ -34,4 +36,15 @@ jobs:

- name: Test tap search
run: |
brew search stuffbucket/tap/
brew search stuffbucket/tap/

- name: Cleanup tap
if: always()
run: |
brew untap stuffbucket/tap 2>/dev/null || true
# Force remove the tap directory if it still exists
sudo rm -rf /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/stuffbucket/homebrew-tap || true
sudo rm -rf /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/stuffbucket || true
# Create parent directory and empty file for action's post.sh to remove without errors
sudo mkdir -p /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/stuffbucket || true
sudo touch /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/stuffbucket/homebrew-tap || true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

# Package build artifacts
pkgs/*/build/
pkgs/*/.build-metadata
installers/
66 changes: 0 additions & 66 deletions Formula/vscode-lima.rb

This file was deleted.

31 changes: 19 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help update check-tag list-formulas update-all info dry-run pkg-sync-versions pkg-check-versions pkg-check-stale pkg-build
.PHONY: help update check-tag list-formulas update-all info dry-run pkg-check-versions pkg-check-stale pkg-build pkg-sync-versions

FORMULA ?=

Expand All @@ -10,9 +10,8 @@ help:
@echo " make dry-run Show what update commands would be needed"
@echo " make update FORMULA=lima TAG=v2.0.0-beta.0.2-fork"
@echo " make list-formulas"
@echo " make pkg-check-versions Check if package versions match formula versions"
@echo " make pkg-check-versions Show package and formula version info"
@echo " make pkg-check-stale Check if packages need rebuilding (commit hash changed)"
@echo " make pkg-sync-versions Update package versions to match formulas"
@echo " make pkg-build Build all macOS installer packages"
@echo ""
@echo "Targets:"
Expand All @@ -21,18 +20,18 @@ help:
@echo " update Update formula with new release tag"
@echo " Requires FORMULA and TAG parameters"
@echo " list-formulas List all available formulas"
@echo " pkg-check-versions Check package vs formula version mismatches"
@echo " pkg-check-versions Show package and formula version info"
@echo " pkg-check-stale Check if packages were built from current commit"
@echo " pkg-sync-versions Sync package versions to match formula versions"
@echo " pkg-build Build all macOS .pkg installer packages"
@echo ""
@echo "Note: Only 2 packages (homebrew + lima). VS Code extension via marketplace."
@echo ""
@echo "Examples:"
@echo " make info"
@echo " make dry-run"
@echo " make update FORMULA=lima TAG=v2.0.0-beta.0.2-fork"
@echo " make pkg-check-versions"
@echo " make pkg-check-stale"
@echo " make pkg-sync-versions"
@echo " make pkg-build"

list-formulas:
Expand Down Expand Up @@ -148,17 +147,25 @@ pkg-check-versions:
@echo ""
@brew tap stuffbucket/tap $$(pwd) 2>/dev/null || true
@echo "lima:"
@brew info --json=v2 stuffbucket/tap/lima | jq -r '.formulae[0].versions.stable' | sed 's/^/ Version: /'
@brew info --json=v2 stuffbucket/tap/lima | jq -r '.formulae[0].versions.stable' | sed 's/^/ Formula version: /'
@echo ""
@echo "Package versions:"
@echo " stuffbucket-homebrew-1.pkg (static tap installer)"
@echo " stuffbucket-lima-2.pkg (major version from formula)"
@echo ""
@echo "vscode-lima:"
@brew info --json=v2 stuffbucket/tap/vscode-lima | jq -r '.formulae[0].versions.stable' | sed 's/^/ Version: /'
@echo "VS Code Extension:"
@echo " Distributed via VS Code Marketplace (stuffbucket-co.lima-manager)"
@echo " No package needed - installs from marketplace"
@echo ""
@echo "Note: Build scripts query brew dynamically at build time."
@echo "Note: stuffbucket-homebrew package is tap-only (version 1.0.0 is static)"

pkg-sync-versions:
@echo "Version sync is no longer needed."
@echo "Build scripts query brew dynamically at build time."
@echo "⚠️ This target is deprecated."
@echo ""
@echo "Version sync is no longer needed:"
@echo " - Package filenames use major version only (e.g., stuffbucket-lima-2.pkg)"
@echo " - Build scripts query brew dynamically at build time"
@echo " - VS Code extension distributed via marketplace"
@echo ""
@echo "To see current versions, run: make pkg-check-versions"

Expand Down
46 changes: 39 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,46 @@ Homebrew formulae for stuffbucket projects.

## Installation

### Via Homebrew (Recommended)
### Quick Install (Recommended)

One command installs everything:

```bash
curl -fsSL https://raw.githubusercontent.com/stuffbucket/homebrew-tap/main/install.sh | bash
```

This installs:
- Homebrew (if not already installed)
- Lima
- VS Code Lima Manager extension (from marketplace)

### Via Homebrew

```bash
# Install Lima
brew tap stuffbucket/tap
brew install stuffbucket/tap/<formula>
brew install stuffbucket/tap/lima

# Install VS Code extension
code --install-extension stuffbucket-co.lima-manager
```

Or install the extension in VS Code:
- Press `Cmd+Shift+X` (Extensions)
- Search for "Lima Manager"
- Click Install

### Via macOS Installer Packages

Pre-built macOS `.pkg` installers are available in the `pkgs/` directory:

1. **stuffbucket-homebrew-1.0.0.pkg** - Installs Homebrew (install first)
2. **stuffbucket-lima-2.0.0.pkg** - Installs Lima (requires Homebrew)
3. **stuffbucket-vscode-lima-0.0.1.pkg** - Installs VS Code Lima extension (requires Homebrew)
1. **stuffbucket-homebrew-1.pkg** - Installs Homebrew (install first)
2. **stuffbucket-lima-2.pkg** - Installs Lima (requires Homebrew)

Then install the VS Code extension:
```bash
code --install-extension stuffbucket-co.lima-manager
```

See [pkgs/README.md](pkgs/README.md) for details.

Expand All @@ -43,11 +69,17 @@ OpenGL function pointer library with EGL support for macOS.

**Repository:** [anholt/libepoxy](https://github.com/anholt/libepoxy)

### vscode-lima
VS Code extension installer for Lima Manager.
## VS Code Extension

The **Lima Manager** VS Code extension is available on the marketplace:

**Marketplace:** [stuffbucket-co.lima-manager](https://marketplace.visualstudio.com/items?itemName=stuffbucket-co.lima-manager)
**Repository:** [stuffbucket/vscode-lima](https://github.com/stuffbucket/vscode-lima)

Install with: `code --install-extension stuffbucket-co.lima-manager`

The extension auto-updates through VS Code.

## License

MIT
Loading