forked from sipb/courseroad2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·21 lines (21 loc) · 920 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# To run this script you must have 'aklog' written in ~/.bash_environment
# (or the environment file for whatever shell you use)
# and 'sipb' and 'athena' written in ~/.xlog (both of these files should be in your athena locker).
# Otherwise, you will not have permission to access the courseroad locker,
# even if you are on courseroad-dev.
#
# syntax: ./deploy.sh [dev or prod] [kerberos]
npm run build-$1
if [ "$1" = "prod" ]; then
echo -n "You are about to deploy to the production site, are you sure? (y/n)? "
read answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
scp -r deploy/production/.htaccess dist/* cgi-bin/ $2@athena.dialup.mit.edu:/mit/courseroad/web_scripts/courseroad/
else
echo cancelled
fi
elif [ "$1" = "dev" ]; then
scp -r deploy/development/.htaccess dist/* cgi-bin/ $2@athena.dialup.mit.edu:/mit/courseroad/web_scripts/courseroad/dev/
else
echo "Invalid build location"
fi