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
| @echo off
set d=%date:~0,10% set t=%time:~0,8%
echo ==============cutting line============== >> "D:\lanbo\laptype.io\auto_git\commit.txt" echo %d% %t% auto commit start... >> "D:\lanbo\laptype.io\auto_git\commit.txt" echo ------------------------hexo clean------------------------ >> "D:\lanbo\laptype.io\auto_git\commit.txt" call hexo clean >> "D:\lanbo\laptype.io\auto_git\commit.txt" echo ------------------------hexo g---------------------------- >> "D:\lanbo\laptype.io\auto_git\commit.txt" call hexo g >> "D:\lanbo\laptype.io\auto_git\commit.txt" echo ------------------------hexo d---------------------------- >> "D:\lanbo\laptype.io\auto_git\commit.txt" call hexo d >> "D:\lanbo\laptype.io\auto_git\commit.txt" echo ----------------------------git pull---------------------------------- >> "D:\lanbo\laptype.io\auto_git\commit.txt" call git pull if errorlevel 1 goto Fail echo ------------------------hexo clean---------------------------------- >> "D:\lanbo\laptype.io\auto_git\commit.txt" call hexo clean >> "D:\lanbo\laptype.io\auto_git\commit.txt" echo ---------------------------git add . --------------------------------- >> "D:\lanbo\laptype.io\auto_git\commit.txt" call git add . echo ---------------------------git commit ------------------------------ >> "D:\lanbo\laptype.io\auto_git\commit.txt" call git commit -m %date:~0,4%-%date:~5,2%-%date:~8,2% echo ---------------------------git push --------------------------------- >> "D:\lanbo\laptype.io\auto_git\commit.txt" call git push echo =================END======================>> "D:\lanbo\laptype.io\auto_git\commit.txt" if errorlevel 0 goto Success pause
:Fail echo fall pause
:Success echo =================Success upload====================== pause
|