forked from appsquickly/typhoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish-build-results.sh
executable file
·29 lines (24 loc) · 1 KB
/
publish-build-results.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
#!/bin/bash
reportsDir=build/reports
resourceDir=Resources
#Publish build results
echo '--------------------------------------------------------------------------------'
echo 'Publishing build results'
echo '--------------------------------------------------------------------------------'
git remote add origin [email protected]:typhoon-framework/Typhoon.git || true # allow `remote add` to fail without failing script
git remote set-url origin [email protected]:typhoon-framework/Typhoon.git
git fetch origin gh-pages:gh-pages
git fetch origin gh-pages
git stash
git checkout gh-pages
git branch --set-upstream-to=origin/gh-pages gh-pages
git pull
ditto build/reports/build-status/build-status.png ./build-status/build-status.png
git add build-status
rm -fr ./docs/latest/api
cp -fr ${reportsDir}/api ./docs/latest/api
git add docs/latest/api
git commit -a -m "publish reports to gh-pages" || true # allow `remote add` to fail without failing script (if nothing to add)
git push -u origin gh-pages
git checkout master
git pull