Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit 75ff2b7

Browse files
committed
installer: fixing several installer and doc issues
1 parent 2c1c7f8 commit 75ff2b7

File tree

6 files changed

+51
-52
lines changed

6 files changed

+51
-52
lines changed

.github/workflows/release-installer.yml

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,52 +23,24 @@ jobs:
2323
# Create version based on date + short commit (e.g., v2025.01.19.abc1234)
2424
echo "version=v$(date +%Y.%m.%d).$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
2525
26-
- name: Create release in private repository
26+
- name: Create release
2727
uses: softprops/action-gh-release@v2
2828
with:
2929
tag_name: ${{ steps.vars.outputs.version }}
3030
name: "Revenue Installer ${{ steps.vars.outputs.version }}"
3131
body: |
32-
🚀 **Revenue Team Workstation Installer**
32+
**Revenue Team Workstation Installer**
3333
34-
Internal release for the Revenue team workstation setup.
35-
For public access, use: https://github.com/sourcegraph/revenue-installer/releases/latest/download/install.sh
36-
37-
**What it does:**
38-
- Sets up macOS development environment
39-
- Installs VS Code, Python, Java, and other tools
40-
- Configures demo applications
41-
- Creates global `revenue` command
42-
43-
**Requirements:**
44-
- macOS (10.15+)
45-
- GitHub access to sourcegraph/revenue repository
46-
47-
Updated from commit: ${{ steps.vars.outputs.sha_short }}
48-
files: |
49-
install.sh
50-
prerelease: false
51-
generate_release_notes: false
52-
53-
- name: Create public release
54-
uses: softprops/action-gh-release@v2
55-
with:
56-
repository: sourcegraph/revenue-installer
57-
tag_name: ${{ steps.vars.outputs.version }}
58-
name: "Revenue Installer ${{ steps.vars.outputs.version }}"
59-
body: |
60-
🚀 **Revenue Team Workstation Installer**
61-
62-
Public installer for the Sourcegraph Revenue team workstation setup.
34+
Workstation setup installer for the Sourcegraph Revenue team.
6335
6436
**Usage:**
6537
```bash
66-
/bin/bash -c "$(curl -fsSL https://github.com/sourcegraph/revenue-installer/releases/latest/download/install.sh)"
38+
/bin/bash -c "$(curl -fsSL https://github.com/sourcegraph/revenue/releases/latest/download/install.sh)"
6739
```
6840
6941
**What it does:**
7042
- Sets up macOS development environment
71-
- Installs VS Code, Python, Java, and other tools
43+
- Installs VS Code, Python, Java, and other tools
7244
- Configures demo applications
7345
- Creates global `revenue` command
7446

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Build/Test Commands
44

5-
- `./revenue init` - Initialize workstation with development tools
5+
- `./install.sh` - Initialize workstation with development tools (bootstrap)
6+
- `./revenue init` - Initialize workstation (alternative method)
67
- `./revenue update` - Update existing tools and packages
78
- `./revenue help` - Show usage help
89
- `revenue init|update|demo` - Global command after setup

DETAILS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Revenue Team Application Manifest
22

33
This list is everything that will be installed on your workstation when running
4-
`revenue init`. All dependencies are managed via [Brewfile](/Brewfile).
4+
the installer. All dependencies are managed via [Brewfile](/Brewfile).
55

66
To update existing installed tools, run `revenue update`
77

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ Complete macOS workstation setup for Revenue team members. Installs all tools ne
77
**Copy and paste this command into Terminal:**
88

99
```bash
10-
/bin/bash -c "$(curl -fsSL https://github.com/sourcegraph/revenue-installer/releases/latest/download/install.sh)"
10+
/bin/bash -c "$(curl -fsSL https://github.com/sourcegraph/revenue/releases/latest/download/install.sh)"
1111
```
1212

1313
**That's it!** The installer will:
14+
1415
- Download this repository to `~/revenue`
1516
- Install all necessary tools (VS Code, Python, Java, etc.)
1617
- Set up demo applications
@@ -56,23 +57,28 @@ See [amp_demos/README.md](amp_demos/README.md) for complete demo documentation.
5657
### Common Issues
5758

5859
**"Command not found: revenue"**
60+
5961
- Close and reopen Terminal, or run: `source ~/.zshrc`
6062

6163
**"Cannot clone repository"**
64+
6265
- Ensure you have access to GitHub and the Sourcegraph organization
6366
- Ask in [#ask-tech-ops](https://sourcegraph.slack.com/archives/C01CSS3TC75) for repository access
6467

6568
**Installation fails with network errors**
69+
6670
- Check VPN/proxy settings
6771
- Rerun the installer - it's safe to run multiple times
6872

6973
**"Xcode Command Line Tools required"**
74+
7075
- Run: `xcode-select --install`
7176
- Wait for installation to complete, then rerun the installer
7277

7378
### Get Help
7479

7580
If you're stuck:
81+
7682
1. Check the error message for specific guidance
7783
2. Try running the installer again (it's safe to repeat)
7884
3. Ask in [#ask-tech-ops](https://sourcegraph.slack.com/archives/C01CSS3TC75) with the error details
@@ -90,12 +96,13 @@ git clone https://github.com/sourcegraph/revenue.git ~/revenue
9096
cd ~/revenue
9197

9298
# 3. Run setup
93-
./revenue init
99+
./install.sh
94100
```
95101

96102
## What Gets Installed
97103

98104
The setup installs development tools and applications including:
105+
99106
- **Editors**: VS Code (with extensions), JetBrains Toolbox
100107
- **Languages**: Python, Java, Node.js
101108
- **Tools**: Git, Amp CLI, mise, tmux, jq

install.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ print_error() {
3131

3232
print_header() {
3333
echo ""
34-
echo "🚀 Sourcegraph Revenue Team Workstation Setup"
35-
echo "============================================="
34+
echo "Sourcegraph Revenue Team Workstation Setup"
35+
echo "=========================================="
3636
echo ""
3737
print_info "This will set up your macOS workstation with all the tools needed for demos and development."
3838
print_info "Estimated time: 15-30 minutes (depending on internet speed)"
@@ -87,15 +87,15 @@ check_github_access() {
8787
echo ""
8888
print_info "Please choose one of these authentication methods:"
8989
echo ""
90-
echo "1. 📱 GitHub CLI (Recommended):"
90+
echo "1. GitHub CLI (Recommended):"
9191
print_info " Install: brew install gh"
9292
print_info " Login: gh auth login"
9393
echo ""
94-
echo "2. 🔐 SSH Key:"
94+
echo "2. SSH Key:"
9595
print_info " Generate: ssh-keygen -t ed25519 -C \"your_email@example.com\""
9696
print_info " Add to GitHub: https://github.com/settings/keys"
9797
echo ""
98-
echo "3. 🌐 Personal Access Token:"
98+
echo "3. Personal Access Token:"
9999
print_info " Create: https://github.com/settings/tokens"
100100
print_info " Configure: git config --global github.token YOUR_TOKEN"
101101
echo ""
@@ -124,8 +124,14 @@ setup_repository() {
124124
# Update repository
125125
git fetch origin >/dev/null 2>&1
126126
if [[ "$current_branch" == "main" ]]; then
127-
git pull origin main >/dev/null 2>&1
128-
print_success "Updated to latest version"
127+
# Check if working directory is clean
128+
if git diff-index --quiet HEAD -- 2>/dev/null; then
129+
git pull origin main >/dev/null 2>&1
130+
print_success "Updated to latest version"
131+
else
132+
print_warning "Repository has uncommitted changes, skipping update"
133+
print_info "Using current version for installation"
134+
fi
129135
else
130136
print_warning "Repository is on branch '$current_branch', not 'main'"
131137
print_info "Consider switching to main for latest updates"
@@ -397,7 +403,7 @@ main() {
397403
run_installer
398404

399405
echo ""
400-
print_success "🎉 Setup complete!"
406+
print_success "Setup complete!"
401407
print_info "You can now use the 'revenue' command to manage your workstation and demos."
402408
print_info "Try: revenue demo list"
403409
echo ""

revenue

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,28 @@ init_environment() {
324324
print_info "Delegating to bootstrap installer for complete setup..."
325325
echo ""
326326

327-
# Use the consolidated installer
327+
# Use local install.sh if available, otherwise download it
328+
local local_installer="$SCRIPT_DIR/install.sh"
328329
local installer_url="https://raw.githubusercontent.com/sourcegraph/revenue/main/install.sh"
329-
if curl -fsSL "$installer_url" | bash; then
330-
print_success "Environment initialization completed!"
330+
331+
if [[ -f "$local_installer" ]]; then
332+
print_info "Using local installer..."
333+
if bash "$local_installer"; then
334+
print_success "Environment initialization completed!"
335+
else
336+
print_error "Local installation failed"
337+
exit 1
338+
fi
331339
else
332-
print_error "Installation failed"
333-
print_info "You can also run the installer directly:"
334-
print_info " curl -fsSL $installer_url | bash"
335-
exit 1
340+
print_info "Downloading installer from repository..."
341+
if curl -fsSL "$installer_url" | bash; then
342+
print_success "Environment initialization completed!"
343+
else
344+
print_error "Installation failed"
345+
print_info "You can also run the installer directly:"
346+
print_info " curl -fsSL $installer_url | bash"
347+
exit 1
348+
fi
336349
fi
337350
}
338351

0 commit comments

Comments
 (0)