-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·42 lines (36 loc) · 1.09 KB
/
setup.sh
File metadata and controls
executable file
·42 lines (36 loc) · 1.09 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
41
42
#!/bin/bash
# Get the first command-line argument
env_name="$1"
# Check if argument is provided
if [ -z "$env_name" ]; then
echo "Usage: $0 <env_name>"
echo " env_name: local, test"
exit 1
fi
# Perform actions based on env_name
case "$env_name" in
local)
echo "Running local environment setup..."
# Put your local-specific commands here
# e.g., start local server, load .env.local, etc.
cd config
ln -sf ../../config/graphregistry/global_cfg.local.yaml config_global.yaml
ln -sf ../../config/graphregistry/index_cfg.local.json config_index.json
;;
test)
echo "Running test environment setup..."
# Put your test-specific commands here
# e.g., run unit tests, set environment variables, etc.
cd config
ln -sf ../../config/graphregistry/global_cfg.graphsearch.yaml config_global.yaml
ln -sf ../../config/graphregistry/index_cfg.graphsearch.json config_index.json
;;
*)
echo "Unknown environment: $env_name"
echo "Please use one of: local, test"
exit 1
;;
esac
# Load nvm and use Node.js version 22
source ~/.nvm/nvm.sh
nvm use 22