-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·46 lines (41 loc) · 1.25 KB
/
build.sh
File metadata and controls
executable file
·46 lines (41 loc) · 1.25 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
43
44
45
46
#!/bin/bash
rm -rf deploy
mkdir deploy
mkdir deploy/js
mkdir deploy/app
mkdir deploy/dist
if test -f ".env"; then
echo ".env exists."
else
cp .env.template .env
fi
# build vue app
if [[ $1 == "prod" ]]; then
echo "** Building prod **"
NODE_ENV=production npm run build
#npm run build
elif [[ $1 == "stage" ]]; then
echo "** Building stage **"
#NODE_ENV=production npm run build
npm run build
elif [[ $1 == "learngene" ]]; then
echo "** Building learngene **"
cp .envTemplateExhibit .env
NODE_ENV=production npm run build
elif [[ $1 == "stage.nebula" ]]; then
echo "** Building nebula **"
cp .envTemplateNebula .env
NODE_ENV=stage npm run build
else
echo "** Building dev **"
npm run build
fi
working_dir=$PWD
# link to files needed for static page
ln -s $working_dir/server/views/index.html $working_dir/deploy/index.html
ln -s $working_dir/client/data $working_dir/deploy/data
ln -s $working_dir/client/assets $working_dir/deploy/assets
ln -s $working_dir/client/js/thirdparty $working_dir/deploy/js/thirdparty
ln -s $working_dir/client/app/third-party $working_dir/deploy/app/third-party
ln -s $working_dir/client/dist/build.js $working_dir/deploy/dist/build.js
ln -s $working_dir/client/dist/build.js.map $working_dir/deploy/dist/build.js.map