-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·33 lines (28 loc) · 1013 Bytes
/
deploy.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
#!/bin/bash
GREEN='\033[0;32m'
LIGHTCYAN='\033[1;36m'
NC='\033[0m'
echo -e "${GREEN}Type your commit comment, followed by [ENTER]:${NC}"
# the read command stores the user input as a string
read comment
# the -e command enables the backslash necessary for colored text
echo -e "${GREEN}commit comment has been loaded${NC}"
# just a spacer
echo -e "${LIGHTCYAN}............${NC}"
echo -e "${GREEN}git add . started${NC}"
git add .
echo -e "${GREEN}git add . completed${NC}"
echo -e "${LIGHTCYAN}............${NC}"
echo -e "${GREEN}git commit -am started${NC}"
eval "git commit -am \"${comment}\""
echo -e "${GREEN}git commit -am completed${NC}"
echo -e "${LIGHTCYAN}............${NC}"
echo -e "${GREEN}git push started${NC}"
git push
echo -e "${GREEN}git push completed${NC}"
echo -e "${GREEN}npm run deploy started${NC}"
npm run deploy
echo -e "${GREEN}npm run deploy completed${NC}"
echo -e "${LIGHTCYAN}............${NC}"
echo -e "${LIGHTCYAN}............${NC}"
echo -e "${GREEN}deployment complete!${NC}"