-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush.sh
executable file
·36 lines (28 loc) · 888 Bytes
/
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
#!/bin/bash -x
git remote set-url --push origin `git config remote.origin.url | sed -e 's/^git:/https:/'`
if ! [ -d build/asciidoc ]; then
echo "No new sources, so not syncing"
exit 0
fi
# double check there were git changes
###################################################################
git diff-index --quiet HEAD
dirty=$?
if [ "$dirty" != "0" ]; then git stash; fi
git checkout master
mv build/asciidoc/html5/Binary-Repository-Manager-Feature-Matrix.html build/asciidoc/html5/index.html
for f in build/asciidoc/html5/*; do
file=${f#build/asciidoc/html5/*}
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
# Not ignored...
cp -rf $f .
git add -A $file
fi
done
git commit -a -m "Changes in table, [ci skip]"
git push
# Create a tag
tagName=$(date +%s)
git tag $tagName
git push origin $tagName
exit 0