sg: Create `sg setup` command that sets up local environment, including dependencies
Created by: mrnugget
The idea is that sg setup
replaces the quickstart steps in our onboarding docs.
Goal: sg setup
installs databases, it sets them up, it installs dependencies, it asks users how they want to run X or Y, helps user setup /etc/hosts
, etc. After that the user can run sg start
to get a working dev environment.
Inspiration: this tweet by a StackOverflow developer.
TODOs
The goal is to add functionality to sg setup
step by step and standardize on a
way to setup and run local dev env.
We start by adding an sg setup
command that only prints the install
instructions, step by step, and end with sg setup
that guides a user through
the setup process and installs dependencies for the user.
-
Create a CI step for sg
that uploads a binary so that new colleagues don't need to install Go before they can runsg setup
-
Finish https://github.com/sourcegraph/sourcegraph/pull/25604 -
Guide user through steps: show each step, ask for confirmation, ask whether they want to use Docker or not.
-
-
Make sg setup
clone repositories-
Clone sourcegraph/sourcegraph
, provide tips on what to do if it fails -
Ask user whether they're an employee or not. If yes: clone sourcegraph/dev-private
.
-
-
Start with macOS: check which dependencies are installed - Instead of printing all dependencies that a user needs to install, check which one's are installed and print instructions for how to install them if not. Only support Homebrew.
-
macOS: install dependencies automatically - Ask user whether we should install missing dependencies automatically. if yes, do so.