-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·57 lines (46 loc) · 1.29 KB
/
install.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
set -e
. ~/.nvm/nvm.sh
# jump into project dir
cd $(dirname $0)
if [[ ! -f .env.local ]]
then
echo "# override for local env" > .env.local
fi
# use correct npm and install dependencies
nvm install
nvm use
npm install
# create api symlinks
ln -sf ../.env ./api/
ln -sf ../.env.local ./api/
ln -sf ../.env.secrets ./api/
ln -sf ../.env.site-configs ./api/
ln -sf ../../site-configs/site-configs.d.ts ./api/src/
# create admin symlinks
ln -sf ../.env ./admin/
ln -sf ../.env.local ./admin/
ln -sf ../.env.secrets ./admin/
ln -sf ../.env.site-configs ./admin/
ln -sf ../api/schema.gql ./admin/
ln -sf ../api/block-meta.json ./admin/
ln -sf ../../api/src/comet-config.json ./admin/src/
ln -sf ../../site-configs/site-configs.d.ts ./admin/src/
# create site symlinks
ln -sf ../.env ./site/
ln -sf ../.env.local ./site/
ln -sf ../.env.secrets ./site/
ln -sf ../.env.site-configs ./site/
ln -sf ../api/schema.gql ./site/
ln -sf ../api/block-meta.json ./site/
ln -sf ../../api/src/comet-config.json ./site/src/
ln -sf ../../site-configs/site-configs.d.ts ./site/src/
# Lang install
sh ./site/intl-update.sh
sh ./admin/intl-update.sh
npm run create-site-configs-env
npm --prefix admin install
npm --prefix api install
npm --prefix site install
npm --prefix create-app install
mkdir -p ./api/uploads