Files
replicate/scripts/setup-homebrew-tap.sh
zeekay a485f34a14 rebrand: complete litestream -> replicate rename
- All source files, configs, docs, CI renamed
- Binary: replicate (not litestream)
- Config: replicate.yml (litestream.yml as fallback)
- Env: REPLICATE_* (LITESTREAM_* as fallback)
- Socket: /var/run/replicate.sock
- Image: ghcr.io/hanzoai/replicate
- Module: github.com/hanzoai/replicate
- Package name: replicate (Go), replicate-vfs (npm/pip/gem)
- VFS: registered as "replicate", pragmas replicate_*
- C exports: ReplicateVFSRegister, GoReplicate*
- Windows service: Replicate
- Systemd unit: replicate.service
- Upstream attribution preserved (README, upgrade test scripts)
2026-04-09 18:03:37 -07:00

86 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "Setting up Homebrew tap repository for Replicate..."
REPO_NAME="homebrew-replicate"
GITHUB_USER="benbjohnson"
echo "This script will help you create the ${GITHUB_USER}/${REPO_NAME} repository."
echo ""
echo "Prerequisites:"
echo "1. GitHub CLI (gh) must be installed and authenticated"
echo "2. You must have permission to create repositories under ${GITHUB_USER}"
echo ""
read -p "Do you want to continue? (y/n) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 1
fi
echo "Creating repository ${GITHUB_USER}/${REPO_NAME}..."
gh repo create ${GITHUB_USER}/${REPO_NAME} \
--public \
--description "Homebrew tap for Replicate" \
--clone=false || echo "Repository may already exist, continuing..."
echo ""
echo "Cloning repository..."
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"
gh repo clone ${GITHUB_USER}/${REPO_NAME} || git clone "https://github.com/${GITHUB_USER}/${REPO_NAME}.git"
cd ${REPO_NAME}
echo "Creating Formula directory..."
mkdir -p Formula
echo "Creating README..."
cat > README.md << 'EOF'
# Homebrew Tap for Replicate
This is the official Homebrew tap for [Replicate](https://github.com/benbjohnson/replicate).
## Installation
```bash
brew tap hanzoai/replicate
brew install replicate
```
## Documentation
For more information about Replicate, visit:
- [GitHub Repository](https://github.com/benbjohnson/replicate)
- [Official Documentation](https://replicate.io)
## License
Apache License 2.0
EOF
echo "Creating initial Formula placeholder..."
cat > Formula/.gitkeep << 'EOF'
# This file ensures the Formula directory is tracked by git
# GoReleaser will automatically create and update formula files here
EOF
echo "Committing initial structure..."
git add .
git commit -m "Initial tap structure" || echo "Nothing to commit"
echo "Pushing to GitHub..."
git push origin main || git push origin master
echo ""
echo "✅ Homebrew tap repository setup complete!"
echo ""
echo "Repository: https://github.com/${GITHUB_USER}/${REPO_NAME}"
echo ""
echo "Next steps:"
echo "1. Create a GitHub Personal Access Token with 'repo' scope"
echo "2. Add it as HOMEBREW_TAP_GITHUB_TOKEN secret in the main repository"
echo "3. GoReleaser will automatically update the tap on each release"