-
Notifications
You must be signed in to change notification settings - Fork 2
/
blog_auto_release.sh
32 lines (26 loc) · 1.02 KB
/
blog_auto_release.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
#!/usr/bin/bash
echo "."
echo " GeekPanshi AUTO Release Server"
echo "."
echo " 1. Start - Compliy and relase to git Tencent "
echo "-- "
hexo clean && hexo generate && hexo d
echo " 1. End - Compliy and relase to git Tencent "
echo "-- "
echo " 2. Start - Delete Github Dir all content"
echo "-- "
cd ./1_delpoy_git-github/ && git pull && ls -l | awk -F" " '{print $9}' | grep . | xargs -n1 -I {} rm -rf {} && cd ..
echo " 2. End - Delete Github Dir all content"
echo "-- "
echo " 3. Start - Copy Tencent git to Github Dir "
echo "-- "
cd ./.deploy_git && ls -l | awk -F" " '{print $9}' | grep . | xargs -I {} cp -rf {} ../1_delpoy_git-github/ && cd ..
echo " 3. End - Copy Tencent git to Github Dir "
echo "-- "
echo " 4. Start - Release all changes to Github "
echo "-- "
cd ./1_delpoy_git-github && git add . && date | xargs -I {} git commit -am "auto_commit by date of "{} && git push && cd ..
echo " 4. End - Release all changes to Github "
echo "."
echo " Release Done !!"
echo "."