Skip to content

Instantly share code, notes, and snippets.

@ikondrat
Last active March 15, 2023 09:50
Show Gist options
  • Select an option

  • Save ikondrat/1d6f0e3404159a0fa97dde239e213c0d to your computer and use it in GitHub Desktop.

Select an option

Save ikondrat/1d6f0e3404159a0fa97dde239e213c0d to your computer and use it in GitHub Desktop.
Setup dev
#!/usr/bin/env bash
# Lets have here everything we need to setup a local environment to avoid manual steps
# To use just run
# bash <(curl -sL https://gist.githubusercontent.com/ikondrat/1d6f0e3404159a0fa97dde239e213c0d/raw/d576aa60227488de195749665881483a31083a49/setup-dev.sh)
# from the root of the project
set -e
echo "Install yq yaml parser"
brew install yq jq
echo "Setup env variables for root folder"
bash <(curl -sL https://gist.githubusercontent.com/ikondrat/2cf87eda8eb41d3da55d18e7e967e14f/raw/457c648c4d0d95355218768e0781b4e95ef88a4e/fill-local-env.sh) .env.local env.local.yml
echo "Setup env variables for web app"
bash <(curl -sL https://gist.githubusercontent.com/ikondrat/2cf87eda8eb41d3da55d18e7e967e14f/raw/457c648c4d0d95355218768e0781b4e95ef88a4e/fill-local-env.sh) apps/web/.env.local apps/web/env.local.yml
echo "Using nodejs version $(node -v)"
echo "Using npm version $(npm -v)"
BINDIR=$(pwd)/bin
echo "Install lokalise to $BINDIR"
curl -sfL https://raw.githubusercontent.com/lokalise/lokalise-cli-2-go/master/install.sh | sh
# include local bin to PATH
export PATH="$BINDIR:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment