-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrawler.sh
More file actions
executable file
·20 lines (20 loc) · 955 Bytes
/
crawler.sh
File metadata and controls
executable file
·20 lines (20 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
echo "[tfi-data] fetch and rebuild ..."
cd /home/crawler/workspace/tfi-data
npm run all 2>&1 > /var/log/crawler/$(date -I).log
echo "[tfi-data] pull remote commits ..."
git pull --rebase 2>&1 >> /var/log/crawler/$(date -I).log
echo "[tfi-data] commit and push ..."
git add . 2>&1 >> /var/log/crawler/$(date -I).log
git commit -m "update data" 2>&1 >> /var/log/crawler/$(date -I).log
git push 2>&1 >> /var/log/crawler/$(date -I).log
cd /home/crawler/workspace/taicca-vis2
echo "[vis.taicca.tw] pull remote commits ..."
git pull --rebase 2>&1 >> /var/log/crawler/$(date -I).log
echo "[vis.taicca.tw] update submodule ..."
git submodule update --remote >> /var/log/crawler/$(date -I).log
git add . 2>&1 >> /var/log/crawler/$(date -I).log
git commit -m "update submodule" 2>&1 >> /var/log/crawler/$(date -I).log
git push 2>&1 >> /var/log/crawler/$(date -I).log
echo "[vis.taicca.tw] deploy ..."
./deploy >> /var/log/crawler/$(date -I).log