-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·33 lines (25 loc) · 977 Bytes
/
deploy.sh
File metadata and controls
executable file
·33 lines (25 loc) · 977 Bytes
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
#!/bin/bash
DIRECTORY_NAME="sinri_story_deploy"
DIRECTORY_PATH="./../${DIRECTORY_NAME}";
echo "---------------------------------------------------";
echo "start build & ready deploy";
echo "---------------------------------------------------";
npm run build;
function readyDeploy () {
echo "---------------------------------------------------";
echo "move items in "${DIRECTORY_NAME}"";
echo "---------------------------------------------------";
cp ./build/* -r "${DIRECTORY_PATH}";
}
echo "---------------------------------------------------";
echo "---------------------------------------------------";
# if [-d "${DIRECTORY_PATH}"] # []를 해석 못함
if test -d "${DIRECTORY_PATH}"; then
echo "배포 디렉토리 존재";
else
echo "배포 디렉토리 없음 -> 생성" && mkdir "${DIRECTORY_PATH}"
fi
readyDeploy;
echo "---------------------------------------------------";
echo "---------------------------------------------------";
echo "done";