-
Notifications
You must be signed in to change notification settings - Fork 0
/
push.sh
executable file
·53 lines (35 loc) · 1.02 KB
/
push.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
#!/bin/bash
#clean up public
#echo -e "\033[0;32mDeleting old copy...\033[0m"
#rm -rf deployment/*
# Build the project.
#echo -e "\033[0;32mBuilding Project...\033[0m"
#npm run build > success.log
# copy build contents to deployment folder
#echo -e "\033[0;32mCopying files to deployment directory...\033[0m"
#cp -r build/* deployment
#echo -e "\033[0;32mDeploying new updates to server...\033[0m"
# Go To Public folder
#cd deployment
# Add changes to git.
#git add .
# Commit changes.
#msg="rebuilding portfolio `date`"
#if [ $# -eq 1 ]
#then msg="$1"
#fi
#git commit -m "$msg" > deploycommit.log
# Push source and build repos.
#git push origin master > deploypush.log
# Come Back up to the Project Root
#cd ..
# commit change in main repo about deployment
echo -e "\033[0;32mPushing all changes updates to GitHub...\033[0m"
git add .
deploymentMsg="update portfolio on `date`"
if [ $# -eq 1 ]
then deploymentMsg="$1"
fi
git commit -m "$deploymentMsg"
git push origin master
echo -e "\033[0;32mSafe exit from script...\033[0m"