-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·54 lines (40 loc) · 1.21 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
#!/usr/bin/env bash
set -e
. ~/.nvm/nvm.sh
# jump into project dir
cd $(dirname $0)
if [[ ! -f .env.local ]]
then
echo -e '# override for local env' > .env.local
fi
# use correct npm and install dependencies
nvm install
nvm use
npm i -g pnpm@8
pnpm install
# create admin symlinks
ln -sf ../api/schema.gql ./packages/admin/schema.gql
# create demo api symlinks
ln -sf ../../.env ./demo/api/.env
ln -sf ../../.env.local ./demo/api
# create demo admin symlinks
ln -sf ../../.env ./demo/admin/.env
ln -sf ../api/schema.gql ./demo/admin/
ln -sf ../api/block-meta.json ./demo/admin/
ln -sf ../api/src/comet-config.json ./demo/admin/
# create demo site symlinks
ln -sf ../../.env ./demo/site/.env
ln -sf ../api/schema.gql ./demo/site/
ln -sf ../api/block-meta.json ./demo/site/
ln -sf ../api/src/comet-config.json ./demo/site/
# create demo campaign symlinks
ln -sf ../../.env ./demo/campaign/.env
ln -sf ../../.env.local ./demo/campaign/.env.local
ln -sf ../api/schema.gql ./demo/campaign/
ln -sf ../api/block-meta.json ./demo/campaign/
ln -sf ../api/src/comet-config.json ./demo/campaign/
# Lang install
sh ./demo/admin/intl-update.sh
sh ./demo/site/intl-update.sh
sh ./demo/campaign/intl-update.sh
mkdir -p ./demo/api/uploads