-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·40 lines (31 loc) · 1.16 KB
/
setup.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# This assumes you have general prerequisites installed as by:
# https://github.com/artsy/potential/blob/master/scripts/setup
# Exit if any subcommand fails
set -e
GREEN=$(tput setaf 2)
NO_COLOR=$(tput sgr0)
echo "Installing project dependencies from Brewfile..."
brew bundle
if command -v mise >/dev/null; then
echo "Installing language dependencies with mise"
mise install
else
echo "Skipping language dependencies installation (mise not found)"
fi
echo "Installing dependencies..."
yarn install --ignore-scripts || (npm install --global yarn@latest && yarn install --ignore-scripts)
echo "Download .env.shared (for common local dev config)..."
if ! aws s3 cp s3://artsy-citadel/positron/.env.shared ./; then
echo "Unable to download shared config from s3. Using .env.oss!"
echo "This is expected for open source contributors."
echo "If you work at Artsy, please check your s3 access."
cp .env.oss .env.shared
fi
if [ ! -e ".env" ]; then # skip if .env exists
echo "Initialize .env from from .env.example (for any custom configuration)..."
cat .env.example > .env
fi
echo "
${GREEN}Setup complete!
To run the project execute: yarn start${NO_COLOR}"