-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathupdate
More file actions
executable file
·24 lines (22 loc) · 779 Bytes
/
update
File metadata and controls
executable file
·24 lines (22 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh
set -e
planet --verbose planet.ini
git checkout gh-pages
cp -r output/* .
# Check for updates. Due to timestamps, many files change with each update,
# however, the files rss10.xml and rss20.xml only change if something
# significant changes. As such, we monitor rss10.xml, and only if that changes,
# we go ahead and create a new commit. Otherwise we just revert the changes and
# switch back to master.
if git diff --quiet rss10.xml
then
# rss10.xml did *not* change
echo "No updates found, no commit is generated in gh-pages"
git reset --hard
else
# rss10.xml did change, create a commit
echo "Updates found, commit is generated in gh-pages"
git add *.xml *.html *.css images
git commit -a -m "Automatic commit"
fi
git checkout master